解析エラーが発生します:
12100 Document parse failure
Description:vError on line 1 of document : Premature end of file. Please ensure that the response body is a valid XML document.
なぜこのエラーが発生するのかわかりません。私のコードは以下です。このエラーの根本的な原因を教えてください。
<?php
header("content-type: text/xml");
require "twilio-php-latest/Services/Twilio.php";
$server= "http://ea3473a.ngrok.com";
/* Set our AccountSid and AuthToken */
$AccountSid = "AC043519349d0042fc190fe61870e591cd";
$AuthToken = "19b05608d0e1b9b7ccda615f6620f388";
$caller=$_REQUEST['From'];
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$from= "+17864310795";
$client = new Services_Twilio($AccountSid, $AuthToken);
try {
$to = $caller;
$url = $server.'/trial.php';
$client->account->calls->create(
$from,
$to,
$url,
array(
'Method' => "GET",
'FallbackMethod' => "GET",
'StatusCallbackMethod' => "GET",
'Record' => "false",
));
} catch (Exception $e) {
// log error
}
?>
<Response>
<Reject reason="busy"/>
</Response>