随笔分类 - php
摘要:phpstorm配合xdebug进行调试会大大提高开发效率,但是从头安装环境会有些麻烦,下边记录一下整修操作过程: 1:安装xdebug 之前版本的MAC安装xdebug直接就brew install xdebug就可以了,但是现在不是在brew里边 需要执行: PECL的安装可以自行百度 xdeb
阅读全文
摘要:当fastcgi_pass 127.0.0.1:9000用此方式将请求交给fpm时/etc/php/7.0/fpm/pool.d/www.conf要注意两个地方的配置
阅读全文
摘要:1:修改apt软件源打开文件 /etc/apt/sources.list添加如下行deb http://packages.dotdeb.org jessie all 2:Fetch the repository key and install it. wget https://www.dotdeb.
阅读全文
摘要:public function getLotteryInfo() { $endTime = $this->getEndTime(); $dateStr = $endTime->format('Y-m-d'); $partOneStartTime = new \Datetime(date("$dateStr 00:00:00")); ...
阅读全文
摘要:CGI: CGI(Common Gateway Interface)是一种协议用于规定Web Server(Apache2, Nginx)与php或者java等间进行交流的一种语言无关的协议。 这一点比较好理解,因为服务器软件Apache2, Nginx它们是不针对任何一种后台处理语言而设计的,那么
阅读全文
摘要:使用php --ini来查询当前使用哪个配置文件
阅读全文
摘要:注意在进行比较如date('Y-m-d H:i:s', strtotime('+1 hour')) > $data的时候,一定要保证两边都是12小时制或者是24小时制,不然无法进行有效的比较$t=time(); echo date("Y-m-d H:i:s",$t);第一个参数的格式分别表示:a -...
阅读全文
摘要:uasort($lastingDates, array($this, 'sortLastingDays'));//在这里sortLastingDays为排序方法//含义是按照数组中的lastingdate的大小进行排序public function sortLastingDays($a, $b){ ...
阅读全文
摘要:date("Y-m-d G:H:s",strtotime("+1 week 1 days 1 hours 1 seconds"));
阅读全文
摘要:1 $abc = GzhAd::findBySql('SELECT * FROM gongZhongHaoInfo where advertisementID >= :start && advertisementID $start, ':end' => $end))->all();...
阅读全文