摘要: array_push向数组尾部压入元素 ,然后返回新数组的长度$a=array("red","green");$array_len = array_push($a,"blue","yellow"); print_r($a);//Array ( [0] => red [1] => green [2] => blue [3] => yellow )print_r($array_len);// 4输出... 阅读全文
posted @ 2019-03-12 14:50 终究是乌云遮了天 阅读(185) 评论(0) 推荐(0) 编辑
摘要: -------------------------------------------------------------------------------- $idArr = array('1','2','3','4') $update = Db::name('task666')->where('id', 'in', $idArr)->update(['mark' => 1]); //... 阅读全文
posted @ 2019-03-12 11:03 终究是乌云遮了天 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 1 $content = preg_replace("/(\s|\&nbsp\;| |\xc2\xa0)/","",$content); 阅读全文
posted @ 2019-03-11 16:20 终究是乌云遮了天 阅读(636) 评论(0) 推荐(0) 编辑
摘要: liunx-crontab-周期任务 分钟 小时 哪天 哪个月 星期几 每天早上6点 0 6 * * * echo "Good morning." >> /tmp/test.txt //注意单纯echo,从屏幕上看不到任何输出,因为cron把任何输出都email到root的信箱了。每两个小时 0 * 阅读全文
posted @ 2019-03-11 14:16 终究是乌云遮了天 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 脚本可触发脚本执行脚本 #!/usr/bin/php -q<?php$cmd = "/usr/bin/php -q in.php";pclose(popen($cmd.' > /dev/null &', 'r'));// 触发autocall.php脚本 //脚本名+空格+参数+空格+参数 $cmd 阅读全文
posted @ 2019-03-07 15:03 终究是乌云遮了天 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 方法1:delete from 表名; 方法2:truncate table 表名; 比 较:1> truncate 是整体删除 (速度较快),delete是逐条删除 (速度较慢)2> truncate 不写服务器 log,delete 写服务器 log,也就是 truncate 效率比 delet 阅读全文
posted @ 2019-03-07 14:48 终究是乌云遮了天 阅读(7655) 评论(0) 推荐(0) 编辑
摘要: get private function getcalldata($concurrent){ //这是用get方式传值 //这是用get方式传值 //这是用get方式传值 //这是用get方式传值 //这是用get方式传值 //这是用get方式传值 //这是用get方式传... 阅读全文
posted @ 2019-03-07 11:53 终究是乌云遮了天 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1 查看表中已存在哪些索引:show index from 表名; 在添加索引之前最好先查看一下该表中已存在哪些索引:show index from 表名; 1、主键索引 注意: 主键索引一张表中只能有一个,但是可以添加多个索引 比如:唯一索引、普通索引、全文索引。 主键索引:一般在建表的时候就添加 阅读全文
posted @ 2019-03-07 11:36 终究是乌云遮了天 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1 'fail', 'msg' => 'fail'))); 14 } 15 $key= $a."-".$b; 16 //redis参数 17 $options= [ 18 'host' => '127.0.0.1', 19 'port' => 6379, 2... 阅读全文
posted @ 2019-03-07 09:22 终究是乌云遮了天 阅读(2173) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/bash #开头必写 2 3 #获取输入 4 read -p "请输入内容:" input 5 echo $input 6 #echo -e "******* ${input}*******" 7 8 9 #tar -xf $input/api.tar.gz -C /var/www/html/ >/dev/null 10 11 #sed -i ... 阅读全文
posted @ 2019-03-06 16:41 终究是乌云遮了天 阅读(1311) 评论(0) 推荐(0) 编辑