本文整理匯總了PHP中Sms::send_sms_post方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sms::send_sms_post方法的具體用法?PHP Sms::send_sms_post怎麽用?PHP Sms::send_sms_post使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sms
的用法示例。
在下文中一共展示了Sms::send_sms_post方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
if (C('SMS_SEND')) {
if (in_array("sms", $type_arr)) {
$r = $noticeApiCurd->actSmsSurNum($from);
$flag = $r['ret'];
if ($flag == "ok") {
//2014/08/19 判斷是否可發送
$table = "nt_sms";
//單條發送消息start
foreach ($to_detail as $to_detail_val) {
$to_name = $to_detail_val['to_name'];
if (in_array($to_name, $noMobile)) {
continue;
}
$to_mobile = $to_detail_val['to_mobile'];
$to_login_name = $to_detail_val['to_login_name'];
$res_sms = Sms::send_sms_post($to_mobile, $content . "【華成雲商】", '');
$status = substr($res_sms, 0, strpos($res_sms, "/"));
//000 短信表示成功
if ($status !== '000') {
$smSendFail[] = $to_name;
}
$data = array("from_mobile" => $from_mobile, "to_mobile" => $to_mobile, "content" => post_check($content), "from_name" => $from, "to_name" => $to_name, "addtime" => time(), "status" => $status, "from_login_name" => $from_login_name, "to_login_name" => $to_login_name, "client_ip" => $client_ip);
$result = $noticeApiCurd->actInsert($data, $table);
}
//單條發送消息end
} else {
$sms_stop = true;
}
}
} else {
$sms_send = false;