摘要: /** * 脚本程序异常捕获 */function handleError(){ global $config; $error = error_get_last(); if (isset($error['type'])) { switch ($error['typ... 阅读全文
posted @ 2015-09-07 17:05 jamesbd 阅读(150) 评论(0) 推荐(0) 编辑
摘要: /** * 发邮件** @param array $receiver 接收人信息* @param array $attachment_info 附件信息* @param string $is_html 是否html内容 默认值不是* @param string $mail_title 邮件标题*... 阅读全文
posted @ 2015-09-07 17:03 jamesbd 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 安装 igbinary 扩展(安装phpssdb扩展时候要用到--enable-ssdb-igbinary): clone https://github.com/igbinary/igbinary.git安装phpssdb 扩展 :git clone https://github.com/jon... 阅读全文
posted @ 2015-09-07 16:50 jamesbd 阅读(384) 评论(0) 推荐(0) 编辑
摘要: URI安全,CodeIgniter 严格限制 URI 中所能包含的字符,以此帮助你设计的程序减少被恶意数据入侵的可能。URI 一般只包含下列内容:字母和数字(Alpha-numeric text)波浪符(Tilde): ~句号(Period): .冒号(Colon): :下划线(Underscore... 阅读全文
posted @ 2015-09-07 16:49 jamesbd 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 该分析器将在页面下方显示基准测试结果,运行过的 SQL 语句,以及 $_POST 数据。这些信息有助于开发过程中的调试和优化。在控制器中设置以下方法以激活该分析器:$this->output->enable_profiler(TRUE);使用以下方法禁用该分析器:$this->output->ena... 阅读全文
posted @ 2015-09-07 16:48 jamesbd 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 近项目用sphinx做地理搜索,可是结果总是不对,明明很近却搜不到结果检查sphinx源文件:static inline double sphSqr ( double v ){return v*v;}float ExprGeodist_t::Eval ( const CSphMatch & tMat... 阅读全文
posted @ 2015-08-03 11:03 jamesbd 阅读(642) 评论(0) 推荐(0) 编辑
摘要: 1、 安装RudixRudix:http://rudix.orgcurl -O https://raw.githubusercontent.com/rudix-mac/rpm/2015.4/rudix.pysudo python rudix.py install rudix or even comp... 阅读全文
posted @ 2015-05-13 19:49 jamesbd 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 这两天看《构建高性能Web站点》这本书,感觉写的真是不错,很多实际项目中会碰到的问题都有所提及,今天看到一个最左前缀原则,以前也听说过,不过一直没搞明白,今天查了下。通过实例理解单列索引、多列索引以及最左前缀原则实例:现在我们想查出满足以下条件的用户id:mysql>SELECT `uid` FRO... 阅读全文
posted @ 2015-03-12 22:19 jamesbd 阅读(16204) 评论(0) 推荐(4) 编辑
摘要: 本文主要为大家讲解了php在使用json_decode函数解码json字符串时,解码不成功返回NULL的问题原因分析和解决方法,感兴趣的同学参考下.一般来说,php对json字符串解码使用json_decode()函数,第一个参数传字符串,第二个参数若为true,返回array;若为false,返回... 阅读全文
posted @ 2014-12-25 18:54 jamesbd 阅读(21621) 评论(0) 推荐(0) 编辑
摘要: 好下面说一下连接MYSQL数据库时报错的解决办法。1,首先确定是mysql_connect()和mysql_pconnect()的问题,故障现象就是函数返回空,而mysql_error()返回“No such file or directory”2,写个phpinfo页面,找到mysql.defau... 阅读全文
posted @ 2014-12-06 21:43 jamesbd 阅读(763) 评论(0) 推荐(0) 编辑