2016年11月24日
摘要:
SplFileObject 读取大文件从第N行开始读: $line = 10; $splFileObj = new SplFileObject(__FILE__,'r'); $splFileObj->seek($line-1); //seek 行数从0 开始计数,此外 $splFileObj->fs
阅读全文
posted @ 2016-11-24 19:09
pushStack
阅读(234)
推荐(0)
2016年11月14日
摘要:
rsync + inotify-tools 实现文件实时同步,测试中手贱犯了个错误:执行/usr/bin/rsync -vzrtopg --delete --progress user1@host1::test_rsync ./ --password-file=/home/rsync/server.
阅读全文
posted @ 2016-11-14 18:08
pushStack
阅读(102)
推荐(0)
2014年7月19日
摘要:
一、memcache.so 的安装wget http://pecl.php.net/get/memcache-2.2.7.tgztar zxvf memcache-2.2.7.tgz./configure --enable-memcache --with-php-config=/usr/local/...
阅读全文
posted @ 2014-07-19 18:11
pushStack
阅读(1061)
推荐(0)
摘要:
一、安装libeventsudo wget http://www.monkey.org/~provos/libevent-1.3.tar.gzsudo tar zxvf libevent-1.3.tar.gzcd libevent-1.3sudo ./configure -prefix=/usrsu...
阅读全文
posted @ 2014-07-19 13:57
pushStack
阅读(168)
推荐(0)
2014年7月18日
摘要:
一.安装Mongodb的PHP扩展wget http://pecl.php.net/get/mongo-1.2.7.tgz //下载扩展包tar zxvf mongo-1.2.7.tgzcd mongo-1.2.7/usr/local/php/bin/phpize./configure -with-...
阅读全文
posted @ 2014-07-18 23:49
pushStack
阅读(277)
推荐(0)
摘要:
find . -name '*.svn' |xargs rm -rf
阅读全文
posted @ 2014-07-18 00:22
pushStack
阅读(253)
推荐(0)
2014年7月17日
摘要:
r+具有读写属性,从文件头开始写,保留原文件中没有被覆盖的内容;w+具有读写属性,写的时候如果文件存在,会被清空,从头开始写。r 打开只读文件,该文件必须存在。 r+ 打开可读写的文件,该文件必须存在。 w 打开只写文件,若文件存在则文件长度清为0,即该文件内容会消失。若文件不存在则建立该文件。 w...
阅读全文
posted @ 2014-07-17 13:11
pushStack
阅读(5834)
推荐(0)
2014年7月13日
摘要:
delimiter |create trigger t1_insert before insert on t1 for each rowbegin insert into t2 values(1,'2','cc');end;|delimiter;//将分隔符置回分号
阅读全文
posted @ 2014-07-13 23:02
pushStack
阅读(154)
推荐(0)
摘要:
function getClientIP(){ global $ip; if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if(getenv("HTTP_X_FORWARDED_FOR"))//用了代理服务器时 ...
阅读全文
posted @ 2014-07-13 21:22
pushStack
阅读(152)
推荐(0)
2014年7月8日
摘要:
show create table stu;//显示建表语句create table t1(t enum('a','b','c'));insert into t1 values('a');create table t2(t set('a','b','c'));insert into t2 value...
阅读全文
posted @ 2014-07-08 22:32
pushStack
阅读(461)
推荐(0)