本文整理汇总了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]);