我试图使用PHP中的Plivo将msg发送到一个数字。一开始我给出了两个美国号码作为来源和目的地。它不起作用,所以我给了印度的非DND号码之后。但代码仍然不起作用。当我第一次尝试这个的时候,任何人都可以帮助我什么是错误。(注::我正在使用代码点火器框架)
public function sendsms()
{
$this->load->helper('url');
require_once APPPATH.'libraries/plivo_php/plivo.php';
$auth_id = "MAYZU4MDGXXXXXXXXXXX";
$auth_token = "M2JmYTQwMDY1MTXXXXXXXXXXXXXXXXXXXXXXXXXX";
$p = new RestAPI($auth_id, $auth_token);
// Send a message
$params = array(
'src' => '917XXXXXXXXX',
'dst' => '919XXXXXXXXX',
'text' => 'Hi, Message from Srusti',
'type' => 'sms'
);
$response = $p -> send_message($params);
// Print the response
echo "Response : ";
print_r ($response['response']);
$this->load->view('sendsms');//Here sendsms is the view name..
}发布于 2015-09-09 15:40:47
亲爱的,可能会发生以下情况。
这些是可能导致错误的问题。
https://stackoverflow.com/questions/32482364
复制相似问题