这就是PHP文件顶部的内容:
<?php
// Start the session
session_start();
?>
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXX";
$token = "XXXXXXXXXXXXXXXXXX";
$client = new Services_Twilio($sid, $token);
$client->account->messages->sendMessage("+1234567890", "+0987654321", "Please?! I love you <3, Twilio Test");
?>
<?php
// Start the session
session_destroy();
?>然后我有下面的<html>。
我遇到的问题是,页面只是加载一个白色空白页面,当我检查Twilio Log查看是否有任何SMS被记录时。
但是页面在没有中间PHP (应该是通过Twilio发送SMS的部分)的情况下加载得很好。
日志是完全空的,没有显示任何外发短信的记录。
任何帮助都将不胜感激!
发布于 2015-08-28 04:24:14
你从哪里得到sendMessage的?根据Docs的说法,这是如何完成的
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "AC8ed2351ef2156d21a66faf913443188c";
$token = "{{ auth_token }}";
$client = new Services_Twilio($sid, $token);
$sms = $client->account->sms_messages->create("+14158141829", "+14159352345", "Jenny please?! I love you <3", array());
echo $sms->sid;https://stackoverflow.com/questions/31974514
复制相似问题