本文整理匯總了PHP中DBAccess::num_format方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBAccess::num_format方法的具體用法?PHP DBAccess::num_format怎麽用?PHP DBAccess::num_format使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBAccess
的用法示例。
在下文中一共展示了DBAccess::num_format方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DBAccess
<?php
# $id$
require_once 'config.inc.php';
require_once 'DBAccessModel.class.php';
require_once 'AppController.class.php';
$db = new DBAccess('received');
$controller = new AppController($db);
#%p the phone number of the sender of the SMS message
#%a all words of the SMS message
#%C message charset
#%i the smsc-id of the connection that received the message
# received.php %p %C %i %a
# 1 2 3 4
# insert to database received sms
$d['body'] = trim(urldecode($argv[4]));
$d['msisdn'] = $db->num_format(urldecode($argv[1]));
$smsc = urldecode($argv[3]);
$d['smsc'] = $smsc == 'auto' ? false : $smsc;
$d['charset'] = urldecode($argv[2]);
//$d['created_at']= "NOW()";
$num = $d['msisdn'];
if ($num == "7210") {
exit;
} else {
$db->save_messages($d);
$data = $db->get_member($d['msisdn']);
//echo $d['message'];
# pattern to check for possible command case insensitive
$pattern = '/^(.+?),(.*)/i';
if (preg_match($pattern, $d['body'], $m)) {
$command = $db->get_pattern($m[1]);