随笔分类 -  php

上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要:array_unshift() 函数用于向数组插入新元素。新数组的值将被插入到数组的开头。 被加上的元素作为一个整体添加,这些元素在数组中的顺序和在参数中的顺序一样。 该函数会返回数组中元素的个数。 提示:您可以插入一个或多个值。 注释:数值键名将从 0 开始,以 1 递增。字符串键名将保持不变。 阅读全文
posted @ 2019-07-12 17:38 盘思动 阅读(278) 评论(0) 推荐(0)
摘要:查看进程就是使用ps命令而已,只不顾ps的参数太多了。 使用php查询的话,必须要开启几个函数(可以执行外部程序的函数),参考官网:http://php.net/manual/zh/book.exec.php 下面是在php进程中查询某个服务创建的进程数,比如httpd,mysqld,sshd....... 至于为什么要减2,可以看下面的代码: 输出如下: ~/t... 阅读全文
posted @ 2019-07-09 09:52 盘思动 阅读(3365) 评论(0) 推荐(0)
摘要:Pay **!注意:v1.x 版本将不做新功能开发,只进行 bug 维护!请大家尽快迁移到 v2 版本!** 开发了多次支付宝与微信支付后,很自然产生一种反感,惰性又来了,想在网上找相关的轮子,可是一直没有找到一款自己觉得逞心如意的,要么使用起来太难理解,要么文件结构太杂乱,只有自己撸起袖子干了。 **说明,请先熟悉支付宝说明文档!!** 欢迎 Star,欢迎 PR!... 阅读全文
posted @ 2019-07-05 20:21 盘思动 阅读(2683) 评论(0) 推荐(0)
摘要:$where_like = ['title','like','%' . $_GET['title'] . '%']; $result_list = $this->model->where($where) ->where($where_like[0],$where_like[1],$where_like[2]) ... 阅读全文
posted @ 2019-07-03 15:43 盘思动 阅读(2749) 评论(0) 推荐(0)
摘要:$where_time = []; if ($_GET['s_time'] && !isset($_GET['e_time'])){ $where_time = ['add_time','> time' , $_GET['s_time']]; $this->assign('s_time',$_GET['s_time'... 阅读全文
posted @ 2019-07-03 14:58 盘思动 阅读(7850) 评论(0) 推荐(0)
摘要:public function tt(){ $num = '19.90'; echo $num; echo '--------------'; echo 100 * $num; echo '--------------'; echo (int)(100 * $num); echo '--------------'; echo (string)(1... 阅读全文
posted @ 2019-06-20 11:44 盘思动 阅读(679) 评论(0) 推荐(0)
摘要:private function make_code(){ $str = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $return_str = ''; $str_len = strlen($str); for ($i = 0;$i < 6;$i++){ $ra... 阅读全文
posted @ 2019-06-18 16:21 盘思动 阅读(721) 评论(0) 推荐(0)
摘要:$postXml = $GLOBALS["HTTP_RAW_POST_DATA"]; //接收微信参数 // 接受不到参数可以使用 file_get_contents("php://input"); //PHP 高版本中$GLOBALS["HTTP_RAW_POST_DATA"] 好像已经被废弃了 阅读全文
posted @ 2019-06-17 14:43 盘思动 阅读(1175) 评论(0) 推荐(0)
摘要:public function tt($times = 1){ $rand = mt_rand(1,5); echo $rand . ''; if ($rand != '5'){ $times++; $this->tt($times); } else { ... 阅读全文
posted @ 2019-05-30 19:09 盘思动 阅读(265) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/xinweiyun/p/7667595.html https://www.cnblogs.com/liuyoung/p/7445990.html# 阅读全文
posted @ 2019-05-18 17:00 盘思动 阅读(728) 评论(0) 推荐(0)
摘要:getchwd() 函数返回当前工作目录。 阅读全文
posted @ 2019-05-18 16:18 盘思动 阅读(216) 评论(0) 推荐(0)
摘要:由于php.ini配置文件中错误显示关闭导致. 将下值由Off 变更为 On display_errors = On display_startup_errors = On whereis php查看php安装目录 默认在/usr/local/php/etc下面 阅读全文
posted @ 2019-05-16 09:36 盘思动 阅读(12163) 评论(0) 推荐(0)
摘要:查看php-fpm进程数:ps aux | grep -c php-fpm [root@ssy106c14c190c69 etc]# ps -ef | grep php-fpm 查看php-fpm 进程数量root 10436 1 3 21:33 ? 00:00:00 php-fpm: master 阅读全文
posted @ 2019-05-09 21:41 盘思动 阅读(592) 评论(0) 推荐(0)
摘要:$arr=array('a','b','c','d','e','f','g');//目标数组 $i_arr=array('1','2');//要插入的数组 $n=2;//插入的位置 array_splice($arr,$n,0,$i_arr); print_r($arr); 阅读全文
posted @ 2019-05-08 11:48 盘思动 阅读(1373) 评论(0) 推荐(0)
摘要:PHP-FPMphp-fpm进程也分为master主进程和worker工作进程。 命令sudo service php-fpm reload 重载配置(平滑重启)sudo service php-fpm restart 重启 没有请求时,截图通 nignx 的截图类似,就不上图了。在有请求未完成的时 阅读全文
posted @ 2019-05-07 22:00 盘思动 阅读(5119) 评论(0) 推荐(0)
摘要:/usr/local/php/etc/php-fpm.conf 优化 阅读全文
posted @ 2019-05-05 10:08 盘思动 阅读(308) 评论(0) 推荐(0)
摘要:<pre>array(5) { [0] =&gt; array(3) { [&quot;name&quot;] =&gt; string(6) &quot;zhang0&quot; [&quot;sex&quot;] =&gt; int(0) [&quot;sex_str&quot;] =&gt; 阅读全文
posted @ 2019-04-22 20:28 盘思动 阅读(133) 评论(0) 推荐(0)
摘要:$china_area->save(['is_del' => 1,'updatetime' => time()]); SHOW COLUMNS FROM `tf_china_area`如果不加 where 条件, sql语句不是更新的; 阅读全文
posted @ 2019-04-22 11:14 盘思动 阅读(521) 评论(0) 推荐(0)
摘要:基于tp3.2 , model 封装开发 参考百度文档:http://ai.baidu.com/docs#/Auth/top 阅读全文
posted @ 2019-04-18 15:47 盘思动 阅读(1405) 评论(0) 推荐(0)

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