1
所以我有這個功能發送短信,功能很好,但問題是當我發送一個#或一個新的行,功能不能按預期工作!捲曲不起作用#
function sendSMS($phoneNumber,$message){
$ch = curl_init();
$urll = "http://www....com/api/sendsms.php?username=username&password=pass&message=$message&numbers=$phoneNumber&sender=sender&unicode=E&return=full";
$url = str_replace(' ','%20',$urll);
// set url
curl_setopt($ch, CURLOPT_URL, $url);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
}
,如果我這樣使用它,例如:
sendSMS("phone number","#hashtag");
不發送消息,而當我用這樣的:
sendSMS("phone number","some text message");
它會發送消息沒有任何問題!
工作,謝謝! –