随笔分类 - 开发语言
摘要:可以解决报错 ext/standard/php_smart_str.h 最新的 phpredis 分了几大分支,针对最新的PHP稳定发行版 php7 有专门为php7的分支,所以我们从github拉下phpredis 源码 git clone https://github.com/phpredis/
阅读全文
摘要:进入安装原php的源码目录, cd ext cd curl/usr/local/php/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=DIR 然后就是编译安装: make make
阅读全文
摘要:修改PHP上传文件大小限制的方法 1. 一般的文件上传,除非文件很小.就像一个5M的文件,很可能要超过一分钟才能上传完.但在php中,默认的该页最久执行时间为 30 秒.就是说超过30秒,该脚本就停止执行.这就导致出现 无法打开网页的情况.这时我们可以修改 max_execution_time在ph
阅读全文
摘要:$date_arr = []; for ($i = 12; $i > 0; $i--) { array_push($date_arr, date("Y-m", strtotime("-{$i} month")));} array_push($date_arr, date("Y-m"));
阅读全文
摘要://时间戳mktime(0,0,0,1,1,date('Y'));//本年初时间戳mktime(0,0,0,date('m'),1,date('Y'));//本月初时间戳mktime(0,0,0,date('m'),date('d')-date('w')+1,date('y')); //本周初时间戳
阅读全文
摘要:// 定义瓶码字符串 $bianhaop_str = substr($bianhaop_str,1); $bianhaop_arr = explode(',', $bianhaop_str); if(!empty($bianhaop_arr)){ //判断本身是否存在重复项 if(count(arr
阅读全文
摘要:$page = isset($data['page']) ? $data['page'] : 1; $page = intval($page); $limit = isset($data['rows']) ? $data['rows'] : 15; $limit = intval($limit);
阅读全文
摘要:$data=array_merge($arr,$count); array_multisort(array_column($data,'addtime'),SORT_ASC,$data);
阅读全文
摘要:1.array_column() 函数-返回输入数组中某个单一列的值。 <?php // 表示由数据库返回的可能记录集的数组 $a = array( array( 'id' => 5698, 'first_name' => 'Bill', 'last_name' => 'Gates', ), arr
阅读全文
摘要:1.下载tp框架,版本5.1.35 ,下载think-swoole,版本2.0.17 composer require topthink/think-swoole=2.0.* 2.在config下书写swoole.php <?php use think\facade\Env; // + // | S
阅读全文
摘要:1.安装redis ,并启动redis服务 2.安装php redis 拓展 3.在redis.php中添加配置 <?php return [ 'host' => '127.0.0.1', 'port' => '6379', ]; 在根目录extend里新建redis目录,并在其里面建Redis.p
阅读全文
摘要:1.下载swoole; cd /usr/local/downloads/git clone https://gitee.com/swoole/swoole.git 2.编译安装 先 yum install autoconf cd swoole//usr/local/php/bin/phpize ./
阅读全文
摘要:问题:C:\server\php_5.6\php.ini文件中查找不到extension=php_zip.dllC:\server\php_5.6\ext文件夹中找不到php_zip.dll 我们到http://windows.php.net/downloads/pecl/releases/ 找对应
阅读全文
摘要:当插入数据库或者更新数据库出现以下错误时 解决办法:将该表中的字段的字符集都改为utf-8
阅读全文
摘要:下面代码覆盖 thinkPhp/library/think/Lang.php 里面的detect()自动检测语言方法
阅读全文
摘要:执行两段脚本并依次点击li元素,都是输出: 0/1/2/3,在这个场景下,作用一样。
阅读全文

浙公网安备 33010602011771号