【发布时间】:2020-10-18 08:24:31
【问题描述】:
当我尝试使用 TWILIO 时出现错误。错误是 php 中的语法错误意外 'use' (t_use) twilio。
【问题讨论】:
-
是同一个人提出了这个问题,以帮助其他面临同样问题的人。
当我尝试使用 TWILIO 时出现错误。错误是 php 中的语法错误意外 'use' (t_use) twilio。
【问题讨论】:
问题在于 use 语句的位置。
//This needs to be at the top of your PHP file, not nested in a conditional eg [IF statements or while loops]: top of your PHP file like as though you are connecting to database.
require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
【讨论】: