【问题标题】:Defining the correct path to Twilio services directory定义 Twilio 服务目录的正确路径
【发布时间】:2016-12-28 23:53:53
【问题描述】:

我没有能力使用 composer 安装 twilio-php 库,所以我手动安装它。作为一个 nubie,我很难理解如何启动一项新服务……请注意第一个 require statement 它指向一个 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); 

【问题讨论】:

    标签: twilio-php


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2021-09-16
      • 1970-01-01
      • 1970-01-01
      • 2012-09-08
      • 1970-01-01
      • 1970-01-01
      • 2016-06-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多