unix_timestamp(now()) 和php的time()一样的功能。
2013-06-25 05:10 · Database · 评论(0)
1、ini_set('session.cookie_lifetime', 2000000); 设置cookie的过期时间,如果为0,cookie在关闭浏览器后过期。 2、ini_set('session.gc_maxlifetime', 3600); 会话的存活时间,单位:秒。但光是这个参数到期,会话不一定会被回收,和下面2个参数还有关系。 3、ini_set('session.gc_probability', 1); 4、ini_set('session.gc_divisor', 1); session.gc_probability = 1(默认) session.gc_divisor =…
2013-06-11 11:23 · PHP · Drupal · 评论(0)
git 回滚: git reset --hard 版本号 强行回滚远程服务器: git push -f 然后每个本地都要执行git reset --hard 版本号操作 该方法只适合小的团队或者一个人的项目使用,大的团结还是建议git reset --hard 版本号,然后比较多所有有变动的文件,然后覆盖回去,然后提交(commit),然后push的远程。
2013-06-09 04:49 · 版本控制 · git · 评论(0)
就是使用into outfile语句,例子如下: show tables into outfile '/tmp/my_file.txt'
2013-05-31 13:30 · Database · 评论(0)
杀死某个mysql的耗时查询的方法: 命令行登录mysql,运行: show processlist; 看到它的进程id,然后执行: KILL QUERY thread_id;
2013-05-31 13:25 · Database · 评论(0)
indexer article 或者: indexer article --rotate article是在sphinx.conf中定义的index名称
2013-05-31 13:23 · 综合技术 · Search · 评论(0)
截图如下:
2013-03-14 07:52 · Python · 评论(0)
find ./ -name '*.html' -mtime -X -exec rm -f {} \; > /dev/null 2>&1 X为天数 如果要删除X天之前的文件,把-X改为+X
2013-03-05 11:41 · OS · 评论(0)
比Ubuntu快多了,特别是老电脑上面。
2013-03-03 12:45 · OS · 评论(0)
db_table_exists db_column_exists
2013-02-14 11:51 · PHP · Drupal · 评论(0)
可以打印出哪些地方调用了该函数。
2013-02-12 13:30 · PHP · 评论(0)
chrome: Xdebug helper firefox: easy Xdebug
2013-02-10 11:52 · PHP · 评论(0)
在 admin/settings/error-reporting 中设置 Error reporting : 选择**:** Write errors to the log and to the screen
2013-01-30 09:05 · PHP · Drupal · 评论(0)
dpm('Custom query is working');
2013-01-18 14:45 · 评论(0)
使用关键字field ... IN(4, 5, 3, 1) ORDER BY FIELD(id, 4, 5, 3, 1)
2013-01-18 05:01 · Database · 评论(0)