定义Twilio服务目录的正确路径

时间:2016-12-28 23:53:53

标签: twilio-php

我没有能力使用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); 

1 个答案:

答案 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';

你在哪个目录中解压缩了这个库?

相关问题