<?php
error_reporting(0);
session_start();
function code($no_of_char)
{
$code='';
$possible_char="0123456789";
while($no_of_char>0)
{
$code.=substr($possible_char, rand(0, strlen($possible_char)-1), 1);
$no_of_char--;
}
return $code;
}
function sendSms($msg, $to)
{
$to=trim($to);
$m.=urlencode($msg);
$smsurl="http://bhashsms.com/api/sendmsg.php?user=*****&pass=*****&sender=******&phone=$to&text=$m&priority=ndnd&stype=normal";
$return = exec($smsurl);
return $return;
}
?>
Run Code Online (Sandbox Code Playgroud)
print_r($smsurl)显示我想要的绝对正确的命令,但不执行exec($smsurl)
我不熟悉的exec()功能.提前致谢.