摘要: 1、// 定义应用目录 define('APP_PATH', __DIR__ . '/../application/'); // 加载框架引导文件 require __DIR__ . '/../thinkphp/start.php'; // 读取自动生成定义文件 $build = include ' 阅读全文
posted @ 2017-03-08 10:30 pengcx 阅读(4557) 评论(0) 推荐(0)
摘要: http://www.kancloud.cn/z113211/cyh 阅读全文
posted @ 2017-02-28 15:59 pengcx 阅读(150) 评论(0) 推荐(0)
摘要: $sql = 'select * from example AS ep LEFT JOIN user AS u ON ep.ui d = u.id where ep.touid = :userId ORDER BY dateline desc LIMIT :start,:num'; $params 阅读全文
posted @ 2017-02-22 19:56 pengcx 阅读(1467) 评论(0) 推荐(0)
摘要: git常用命令使用参考 git add file1.txt file2.txt 添加文件到暂存区 git commit -m "xxx" 提交到本地仓库 git status 仓库当前的状态 git diff file1.txt 比较工作区文件和HEAD区别 git log 显示从最近到最远的提交日 阅读全文
posted @ 2017-02-17 16:38 pengcx 阅读(97) 评论(0) 推荐(0)
摘要: 1、'email' => array( 'name' => 'email', 'require' => true, 'min' => '1', 'regex' => "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i" 阅读全文
posted @ 2017-02-17 08:40 pengcx 阅读(525) 评论(0) 推荐(0)
摘要: 使用批量查询,而不是N次循环查询! 重复的数据,不要重复获取; 根据需要,按需要获取表字段,而不是SELECT *; 针对频繁的搜索字段,建立必要的索引,以加快查询速度; 使用关联查询,而不是粗暴地类似:where uid IN (... 这里是成千上W个用户ID ...); 针对单条SQL语句执行 阅读全文
posted @ 2017-02-16 14:46 pengcx 阅读(158) 评论(0) 推荐(0)
摘要: http://demo.phalapi.net/?service=User.getBaseInfo&user_id=1&__sql__=1 阅读全文
posted @ 2017-02-16 10:54 pengcx 阅读(2284) 评论(0) 推荐(0)
摘要: http://idea.lanyus.com/ 阅读全文
posted @ 2017-02-15 09:53 pengcx 阅读(177) 评论(0) 推荐(0)
摘要: 在很多时候,我们会遇到数据库表里面的某个值需要+1操作,我们不能简单地在update的时候写入array('key' => 'key+1'),因为在解析sql的时候,key+1 会带上引号作为一个字符串被处理,所以,这样的操作并没有达到我们想要的效果,当然,这是有解决方法的。具体操作如下: 阅读全文
posted @ 2017-02-13 15:13 pengcx 阅读(3406) 评论(0) 推荐(0)
摘要: 注意:全文检索模块需要mysql开启全文索引功能,开启方法:修改mysql配置文件:window服务器为my.ini,linux服务器为my.cnf,在 [mysqld] 后面加入一行“ft_min_word_len=1”,然后重启Mysql。 阅读全文
posted @ 2017-02-06 17:06 pengcx 阅读(298) 评论(0) 推荐(0)