随笔分类 - php
摘要:1 'tom', 5 'age' => 20 6 ), 7 array( 8 'name' => 'anny', 9 'age' => 18 10 ), 11 array( 12 ...
阅读全文
摘要:1 <?php 2 $recordingname = '通话录音@18502290616(18502290616)_20171103142448.mp3'; 3 $suffix = end(explode('.', $recordingname));//echo 'mp3'
阅读全文
摘要:1 <?php 2 $str = 'a b c d e'; 3 echo preg_replace('# #','',$str);//输出 "abcde"
阅读全文
摘要:1 <?php 2 /** 3 * 获取随机useragent 4 */ 5 private function get_rand_useragent($param) { 6 $arr = array( 7 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko)...
阅读全文
摘要:1 ";//-764540111 4 echo long2ip($enip);//210.110.11.49
阅读全文
摘要:简介:队列要遵守先进先出的原则 demo.php demo2.php(定时执行脚本)
阅读全文
摘要:; opcache的开关,关闭时代码不再优化. opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP opcache.enable_cli=1 ; OPcache的共享内存大小,以兆字节
阅读全文
摘要:1 ob_end_clean();#清除并关闭缓冲,输出到浏览器之前使用这个函数。 2 ob_implicit_flush(1);#控制隐式缓冲泻出,默认off,打开时,对每个 print/echo 或者输出命令的结果都发送到浏览器。 3 sleep(2);
阅读全文
摘要:语法 strpos(string,find,start) 参数 描述 string 必需。规定要搜索的字符串。 find 必需。规定要查找的字符串。 start 可选。规定在何处开始搜索。 语法 strpos(string,find,start) 参数 描述 string 必需。规定要搜索的字符串。
阅读全文
摘要:语法 str_replace(find,replace,string,count) 参数 描述 find 必需。规定要查找的值。 replace 必需。规定替换 find 中的值的值。 string 必需。规定被搜索的字符串。 count 可选。对替换数进行计数的变量。 语法 str_replace
阅读全文
摘要:1 public function rand_ip(){ 2 $ip_long = array( 3 array('607649792', '608174079'), //36.56.0.0-36.63.255.255 4 array('975044608', '977272831'), //58.30.0.0-58....
阅读全文
摘要:1 header("Access-Control-Allow-Origin: * "); 2 header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
阅读全文
摘要:1 //设置中国时区 2 date_default_timezone_set('PRC'); 3 //今天的时间搓 4 $today_start = strtotime(date('Y-m-d',time()).' 0:0:0'); 5 $today_end = strtotime(date('Y-m-d',time()).' 23:59:59'); 6 //昨天的时间戳 7 $...
阅读全文

浙公网安备 33010602011771号