本文整理匯總了PHP中DBAccess::get_pattern方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBAccess::get_pattern方法的具體用法?PHP DBAccess::get_pattern怎麽用?PHP DBAccess::get_pattern使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBAccess
的用法示例。
在下文中一共展示了DBAccess::get_pattern方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: urldecode
$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]);
$d['message'] = trim($m[2]);
$db->log_debug($m, "pattern-> ");
} else {
#$db->send_sms($d['msisdn'], $db->get_tmpl('invalid'), $d['smsc']);
$command = $db->get_pattern($d['body']);
if ($command) {
$db->log_debug($command, "pattern-> ");
switch ($command) {
case 'help reply':
if (!$data) {
exit;
}
$controller->helprep($d);
break;
case 'help':