我試圖做一個簡單的,刪除所有記錄,我不斷收到此錯誤拋出:致命錯誤:未捕獲的異常「Twilio 例外 EnvironmentException」與消息「無法解析主機:0
Fatal error: Uncaught exception 'Twilio\Exceptions\EnvironmentException' with message 'Could not resolve host: 0' in C:\xampp\htdocs\twilio-php-master\Twilio\Http\CurlClient.php:41 Stack trace: #0
代碼使用如下,請幫助!
<?php
require_once 'twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
// Set our AccountSid and AuthToken
$sid = 'MYSID';
$token = 'MYTOKEN';
// Your Account Sid and Auth Token from twilio.com/user/account
$client = new Client($sid, $token);
foreach ($client->account->recordings->getPage(0, 50, array('DateCreated>' => '2011-07-05 08:00:00', 'DateCreated<' => '2011-08-01')) as $recording) {
echo $recording->sid." -- ". $recording->date_created . "\n";
$client->account->recordings->delete($recording->sid);
}
?>
根據代碼,它看起來像'getPage()'正在尋找'$ targetUrl'。 – aynber