2つのフォーム入力をPHPスクリプトに配置する必要があります。私はgetメソッドを使用しますが、私のウェブサーバ上でコードを実行しようとすると500エラーが発生します。ここでPHPスクリプトのgetメソッドを使用できません
index.htmlを
<!DOCTYPE html>
<html>
<head>
\t <title>SMS</title>
</head>
<body>
<form action="send_besked.php" method="get">
Tlf:: <input type="text" name="number"><br>
Besked: <input type="text" name="msg"><br>
<input type="submit">
</form>
</body>
</html>
は、私は私のdeletedeアクセストークンと私sであったsend_besked.php
<?php
// Required if your environment does not handle autoloading
require __DIR__ . '/vendor/autoload.php';
// Use the REST API Client to make requests to the Twilio REST API
use Twilio\Rest\Client;
// Your Account SID and Auth Token from twilio.com/console
$sid = 'xxxxx';
$token = 'xxxxx';
$client = new Client($sid, $token);
// Use the client to do fun stuff like send text messages!
$client->messages->create(
// the number you'd like to send the message to
'($_GET["number"])',
array(
// A Twilio phone number you purchased at twilio.com/console
'from' => '+19152282067',
// the body of the text message you'd like to send
'body' => 'echo ($_GET["msg"])'
)
);
ですid。
ありがとうござい削除? 500のエラーはログに何かを書き込んで、何が起こっているかをあなたに知らせます。 – GentlemanMax