Monthly Archives: 二月 2012

用.htaccess禁止查看目录下内容

如网站的某个目录没有首页文件,如index.htm, default.html,index.php等,我们只要打开这个目录,就可以查看到这个目录下所有内容。也正因此,很多黑客利用这个方法来查某个目录下文件的漏洞以便攻击这个网站。 那么有没有办法禁止人们查看这类没有默认首页的目录呢?当然有!对于一个支持.htaccess文件的空间, 可以在.htaccess文件的开始处加如下代码: # Disable Directory Browsing Options All -Indexes 我们也可另一个方法,那就是在这个目录下加下空间的首页文件以达到人这查看不到这个目录下其它内容的目的。 本文译自:http://www.phpknow.com/disable-directory-browsing-with-htaccess/

Posted in PHP小技巧 | Leave a comment

PHP 5.3.10 已经发布!

The PHP development team would like to announce the immediate availability of PHP 5.3.10. This release delivers a critical security fix. Security Fixes in PHP 5.3.10: Fixed arbitrary remote code execution vulnerability reported by Stefan Esser, CVE-2012-0830. All users are … Continue reading

Posted in PHP中文博客 | Leave a comment