Garey's Blog–FreeBSD/PHP/GoLang

文章存档三月, 2011

三月 25th, 2011

PHP代码源被黑了!

No Comments, PHP, by garey, 7,705 views.

源头在于wiki.php.net的漏洞导致wiki账号被盗,而wiki的账号和php代码源的SVN提交权限相关联。 有图有真相: 原文: The wiki.php.net box was compromised and the attackers were able to collect wiki account credentials. No other machines in the php.net infrastructure appear to have been affected. Our bi…

三月 17th, 2011

关于Memcache::increment和Memcache::decrement的使用

1 Comment, PHP, by garey, 33,985 views.

PHP在操作Memcache数据的时候,我们习惯用get,set,delete比较多些,突然发现increment和decrement其实是很有用的,听说使用得当对程序的性能是很有帮助的。 先看下文档里的说明:Memcache::increment()将指定元素的值增加value。如果指定的key 对应的元素不是数值类型并且不能被转换为数值, 会将此值修改为value。Memcache::decrement()方法将元素的值减小value。 类似于 Memcache::increment()方法,首先将元…