随笔分类 -  php

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要:Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 ) Array ( [0] => 6 [1] => 1 [2] => 3 [3] => 2 [4] => 5 [5] => 7 [6] => 阅读全文
posted @ 2019-09-20 11:44 盘思动 阅读(136) 评论(0) 推荐(0)
摘要:/^[0-9]+$/ 阅读全文
posted @ 2019-09-18 14:03 盘思动 阅读(2474) 评论(0) 推荐(0)
摘要:SELECT `id`,`status`,`short_place`,`merchant_id`,`putin_time` FROM `tf_machine` WHERE `status` = 1 AND `merchant_id` <> 0 AND ( `short_place` like '%蚂蚁极致网络会所%' OR place like '%蚂蚁极致网络会所%' ) ORDER BY sa 阅读全文
posted @ 2019-09-17 14:12 盘思动 阅读(168) 评论(0) 推荐(0)
摘要:echo date('Y-m-01', strtotime('-1 month')); echo ""; echo date('Y-m-t', strtotime('-1 month')); echo ""; 阅读全文
posted @ 2019-09-06 18:14 盘思动 阅读(159) 评论(0) 推荐(0)
摘要:$beginToday = mktime(0,0,0,date('m'),date('d'),date('Y')); $endToday = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1; //php获取昨日起始时间戳和结束时间戳 $beginYesterday = mktime(0,0,0,date('m'),date('d')-1,date(' 阅读全文
posted @ 2019-09-06 15:02 盘思动 阅读(437) 评论(0) 推荐(0)
摘要:$str = '中'; if (preg_match('/^[\x{4e00}-\x{9fa5}]+$/u',$str)){ echo '中文'; } else { echo 'no'; } 阅读全文
posted @ 2019-09-04 11:25 盘思动 阅读(399) 评论(0) 推荐(0)
摘要:<pre>array(3) { [&quot;errno&quot;] =&gt; string(1) &quot;0&quot; [&quot;errmsg&quot;] =&gt; string(2) &quot;ok&quot; [&quot;save_name&quot;] =&gt; st 阅读全文
posted @ 2019-09-03 16:53 盘思动 阅读(2972) 评论(0) 推荐(0)
摘要:public function zip_download() { $array = array( 'http://local.qki.com/site_upload/erweima/20190826/1566809174292_100063_865373044010119.png', 'http://local.q... 阅读全文
posted @ 2019-08-27 18:18 盘思动 阅读(441) 评论(0) 推荐(0)
摘要:<pre> array(8) { [0] => string(1) 2 [1] => string(2) 19 [2] => string(2) 18 [3] => string(2) 17 [4] => string(2) 16 [5] => string(2) 14 [6] => string( 阅读全文
posted @ 2019-08-21 11:54 盘思动 阅读(637) 评论(0) 推荐(0)
摘要:$num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46 //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num); echo $format_num; //10.46 /... 阅读全文
posted @ 2019-08-17 00:30 盘思动 阅读(3914) 评论(0) 推荐(0)
摘要:switch ($date_type){ case 'yesterday': $res_data = [ 'start_time' => strtotime(date('Y-m-d',time())) - 24 * 3600, 'end_time' => strtotime(date('Y-m-d',time())) ]; break; case 'today': $res_data = [ 's 阅读全文
posted @ 2019-08-17 00:29 盘思动 阅读(177) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-08-16 21:44 盘思动 阅读(245) 评论(0) 推荐(0)
摘要:<?php //对数组中的每个元素做函数处理 $arr = array(1,2,3,4,5,6); function cheng($hah){ return $hah*2; } var_dump(array_map('cheng',$arr)); 阅读全文
posted @ 2019-08-11 13:01 盘思动 阅读(139) 评论(0) 推荐(0)
摘要:strtolower(pathinfo(abs.php,PATHINFO_EXTENSION)); 小写 通过pathinfo返回扩展名 pathinfo() 函数以数组的形式返回文件路径的信息。 pathinfo(path,options) path:规定要检查的路径。 options:可选。规定 阅读全文
posted @ 2019-08-11 10:32 盘思动 阅读(577) 评论(0) 推荐(0)
摘要:function array2object($array) { if (is_array($array)) { $obj = new StdClass(); foreach ($array as $key => $val){ $obj->$key = $val; } } else { $obj = $arr... 阅读全文
posted @ 2019-07-17 18:28 盘思动 阅读(423) 评论(0) 推荐(0)
摘要:'; shuffle($arr); print_r($arr); ?> Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 ) Array ( [0] => 6 [1] => 1 [2] => 3 [3] => 2 [4] => 5 [5] => 7 [6] => 8 [7] => 4 ... 阅读全文
posted @ 2019-07-17 17:09 盘思动 阅读(302) 评论(0) 推荐(0)
摘要:参考腾讯官方文档: http://kf.qq.com/faq/161222NneAJf161222U7fARv.html?pass_ticket=4K97qCCjgTaO4WwN1x%2BCdKEqLLpHfB1QG%2Fc0FvRawAXKsOxvyJSw2%2FmOg878QADx 微信支付是不 阅读全文
posted @ 2019-07-16 10:48 盘思动 阅读(5618) 评论(0) 推荐(0)
摘要:1、php-fpm优化参数介绍他们分别是:pm、pm.max_children、pm.start_servers、pm.min_spare_servers、pm.max_spare_servers。pm:表示使用那种方式,有两个值可以选择,就是static(静态)或者dynamic(动态)。在更老一 阅读全文
posted @ 2019-07-13 11:53 盘思动 阅读(813) 评论(0) 推荐(0)
摘要:子进程数已经达到设置的最大值。 要设置php进程数量。需要在php-fpm.conf文件中修改。 先看/usr/local/php/etc/php-fpm.conf文件各项配置解析 pid = run/php-fpm.pid#pid设置,默认在安装目录中的var/run/php-fpm.pid,建议 阅读全文
posted @ 2019-07-13 10:11 盘思动 阅读(10177) 评论(2) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页