随笔分类 -  php

摘要:``` where[$field] = $value; return $obj; } public function update(array $params) { $obj = self::getInstance(); $obj->update = $params; } public function get() {... 阅读全文
posted @ 2019-07-19 09:45 三百里江山 阅读(640) 评论(0) 推荐(0)
摘要:phalcon 框架3.0更新时报错 环境 docker环境 错误 原因 composer.json 升级 google/protobuf, grpc/grpc 出现以上错误 .无法加/var/www/config/config.php配置文件 , 而真实config目录为: /var/www/ap 阅读全文
posted @ 2019-06-18 19:01 三百里江山 阅读(449) 评论(0) 推荐(0)
摘要:``` //设置内存大小 ini_set('memory_limit','512M'); //打开日志 ini_set('log_errors', 'On'); //定向日志记录文件 ini_set('error_log', '/tmp/zz_error_sis.log'); set_time_limit(600); ``` 阅读全文
posted @ 2019-06-05 09:52 三百里江山 阅读(581) 评论(0) 推荐(0)
摘要:源码 "https://github.com/sektioneins/pcc" 使用方法 环境: mac cli 命令行执行 审查结果分等级显示 high: 高危 medium: 中危 low: 低危 maybe: 见意 comment: 见意 显示结果为英文的,可以使用chrome自带的翻译转换一 阅读全文
posted @ 2019-05-23 13:32 三百里江山 阅读(148) 评论(0) 推荐(0)
摘要:一.安装brew 二.安装composer 阅读全文
posted @ 2018-08-06 20:11 三百里江山 阅读(1973) 评论(0) 推荐(0)
摘要:相当于: 阅读全文
posted @ 2018-01-15 18:08 三百里江山 阅读(347) 评论(0) 推荐(0)
摘要:ini_set("display_errors", "On");//若页面不报错的话,请设置php.ini 的display_errors 为 On error_reporting(E_ALL);//报所有的错误 阅读全文
posted @ 2017-12-31 19:36 三百里江山 阅读(647) 评论(0) 推荐(0)
摘要:第一步:安装composerwin环境安装:下载地址:https://getcomposer.org/Composer-Setup.exe 下载后直接点击安装即可测试:cmd ->composerlinux环境安装:1)php -r "copy('https://getcomposer.org/in 阅读全文
posted @ 2017-04-06 13:48 三百里江山 阅读(1157) 评论(0) 推荐(0)
摘要:1 <?php 2 3 /** 4 * API 5 * User: sgfoot 6 * Date: 2017/3/20 7 * Time: 18:05 8 */ 9 class apiCurl 10 { 11 private $config = array( 12 'key' => '7D86A7 阅读全文
posted @ 2017-03-21 10:58 三百里江山 阅读(1109) 评论(0) 推荐(0)
摘要:if($filter['mode']) { switch ($filter['mode']) { case 1://今天的数据 $time_start = date("Y-m-d H:i:s",mktime(0, 0 , 0, date('m'),date('d'),... 阅读全文
posted @ 2017-03-06 17:10 三百里江山 阅读(289) 评论(0) 推荐(0)
摘要:($i / $j)) { echo $i . '就是素数'; } } echo ''; for($i = 2;$i '; } } 阅读全文
posted @ 2017-02-17 16:03 三百里江山 阅读(797) 评论(0) 推荐(0)
摘要:与下面的参数有关 nginx: fastcgi_connect_timeout fastcgi_read_timeout fastcgi_send_timeout php-fpm:request_terminate_timeout php.ini:default_socket_time 阅读全文
posted @ 2016-12-05 09:22 三百里江山 阅读(1169) 评论(0) 推荐(0)
摘要:strpos,strstr,strchr都是查找某字符出现的位置,若未找到,则返回false(判断是 ) 如: 判断字符是否含查找的字符串 阅读全文
posted @ 2016-12-02 14:14 三百里江山 阅读(1105) 评论(0) 推荐(0)
摘要:splFileObject 可以处理上M,G级别的数据.专门处理大数据文件的. 阅读全文
posted @ 2016-11-30 15:51 三百里江山 阅读(1164) 评论(0) 推荐(0)
摘要:去官方下载apc:pecl.php.net 搜索apc,安装最新的. #wget http://pecl.php.net/get/APC# tar -xzvf APC-3.1.9.tgz#cd APC-3.1.9.tgz# /usr/local/php/bin/phpize# ./configure 阅读全文
posted @ 2016-11-21 17:49 三百里江山 阅读(555) 评论(0) 推荐(0)
摘要:项目下载地址:http://code.google.com/p/phpquery/ 获取内容的方法: 第一种:newDocumentFile 第二种: 获取网页内容: 第一种:获取html节点 第二种:获取script内容(会分数组) 突破防爬虫 阅读全文
posted @ 2016-11-17 10:38 三百里江山 阅读(3096) 评论(0) 推荐(0)
摘要:安装pdo_mysql cd /usr/local/src/php-5.4.0/ext/pdo_mysql/ /usr/local/php/bin/phpize # /usr/local/php为php安装后的目录 ./configure --with-php-config=/usr/local/p 阅读全文
posted @ 2016-11-14 11:23 三百里江山 阅读(3246) 评论(0) 推荐(0)
摘要:function get_content($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $header = array(); $header[] = 'Host: t.xx.com'; $header[] = 'Accept-Encodi... 阅读全文
posted @ 2016-10-31 15:16 三百里江山 阅读(3377) 评论(0) 推荐(0)
摘要:若报:504 Gateway Time-out则与nginx有关 解决方案: #vim nginx.conf 添加以下代码: http{ fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; 阅读全文
posted @ 2016-10-18 10:26 三百里江山 阅读(214) 评论(0) 推荐(0)
摘要:报Warning: file_get_contents(http://www.dianping.com/shop/8042874) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 4 阅读全文
posted @ 2016-10-09 17:40 三百里江山 阅读(6011) 评论(0) 推荐(1)