php常用方法之判断输入的字符串是否是一个合法的手机号(仅限中国大陆)
pren 发布于 2021-10-12
function isMobile($string) { if(preg_match('/^[1]+[3,4,5,7,8]+\d{9}$/', $string)) return true; return false; //return ctype_digit($string) &...
阅读(265)评论(0)赞 (0)
pren 发布于 2021-10-12
function isMobile($string) { if(preg_match('/^[1]+[3,4,5,7,8]+\d{9}$/', $string)) return true; return false; //return ctype_digit($string) &...
阅读(265)评论(0)赞 (0)
pren 发布于 2021-10-12
function isPhone($string) { if (preg_match('/^[0,4]\d{2,3}-\d{7,8}$/', $string)) return true; return false; }
阅读(224)评论(0)赞 (0)
pren 发布于 2021-10-12
function pincheTime($time) { $today = strtotime(date('Y-m-d')); //今天零点 $here = (int)(($time - $today)/86400) ; if($here==1){ return '明天'; } ...
阅读(240)评论(0)赞 (0)
pren 发布于 2021-10-12
function is_weixin() { return strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger'); }
阅读(316)评论(0)赞 (0)
pren 发布于 2021-10-12
//是否手机访问 function is_mobile() { $user_agent = $_SERVER['HTTP_USER_AGENT']; $mobile_agents = array("240x320","acer","acoon","acs-","abacho","...
阅读(292)评论(0)赞 (0)
pren 发布于 2021-10-12
function get_real_ip() { if(@$_SERVER["HTTP_ALI_CDN_REAL_IP"]){ $ip = $_SERVER["HTTP_ALI_CDN_REAL_IP"]; } elseif (@$_SERVER["HTTP_X_FORWARDE...
阅读(279)评论(0)赞 (0)
pren 发布于 2021-10-12
function redirect($url = 'https://www.z6.net.cn/php/816.html'){ if (!headers_sent()) { header("Location: {$url}"); exit();...
阅读(243)评论(0)赞 (0)
pren 发布于 2021-10-12
function check_data($data){ if(is_array($data)){ foreach($data as $key => $v){ $data[$key] = $this->check_data($v); } }else{ $data = trim($d...
阅读(264)评论(0)赞 (0)
pren 发布于 2021-10-12
function return_json($data, $is_exit = true) { $callback = $_GET['callback'] ?? ''; if ($callback) { echo '' . $callback . "(" . json_encode...
阅读(263)评论(0)赞 (0)
pren 发布于 2021-10-12
function post_curl($url, $data, $timeout = 5) { $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER...
阅读(353)评论(0)赞 (0)
最新评论
Forex wiki. https://lt.forex-stock-bitcoin-brokers.com
Magnificent items from you, man. I have take note your stuff
Following on from the 3rd March Meetings held by economic de
It is remarkable, rather valuable message dfgdlfg2131.32
一般都会有一个沙盒期的,过了沙盒期就会慢慢放出来
百度不收录是应为是新站的原因吗?
The spike in consumer prices that left inflation at a four-d