我没有能力使用composer来安装twilio-php库,所以我手动安装它。对于我来说理解如何启动新服务非常困惑...请注意第一个要求语句它指向Services / Twilio目录。下载Twilio-Php库后,没有名为Services的目录。此外,$ client = new Services Twilio也需要正确的路径。我该怎么办,帮忙?
<?php
require("Services/Twilio.php");
require("database.php");
// initiate phone call via Twilio REST API
// Set our AccountSid and AuthToken
$AccountSid = "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$AuthToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
// Instantiate a new Twilio Rest Client
$client = new Services_Twilio($AccountSid, $AuthToken);
答案 0 :(得分:0)
latest install instructions显示以下内容:
<?php
// Require the bundled autoload file - the path may need to change
// based on where you downloaded and unzipped the SDK
require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
你在哪个目录中解压缩了这个库?