当前位置: 首页 > 网络学院 > 服务端脚本教程 > PHP > PHP 安全技巧连载 #2[译]

PHP
PHP Libxml
PHP Math
PHP Misc
PHP MySQL
PHP SimpleXML
PHP String
PHP XML
PHP Zip
PHP Mail
用PHP5的DirectoryIterators递归扫描目录
PHP 阻止SQL注入式攻击
PHP5面向对象 - 基础 - 类和对象
PHP5面向对象 - 基础 - 类的属性( public )
PHP5面向对象 - 基础 - 类的属性( private )
PHP5面向对象 - 基础 - 方法
PHP5面向对象 - 基础 - 对象的比较
php5面向对象 - 基础 - 构造函数
php5面向对象 - 基础 - 析构函数
用PHP控制用户的浏览器 - ob*函数的使用
PHP PDO 学习笔记

PHP 安全技巧连载 #2[译]


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 863 ::
收藏到网摘: n/a

原文出处:http://devzone.zend.com/article/1745-PHP-Security-Tip-2
翻译:[email protected]

Security by obscurity is no security at all. On the other hand you don't want to give away information about your site either. Today's tip is a simple one but one that is often overlooked in production environments.

通过隐藏(信息)并不能从根本上保证安全。(但)另一方面你也不应该泄露任何有关你网站的信息。今天的技巧是非常简单的但也是经常被忽视的。

 

Make sure you do not display errors and potentially leak information about your site.
确保你没有将错误信息或是潜在的有关你网站的信息显示给外界


Simply setting display_errors = Off in your php.ini of your production server will prevent you from leaking information that may give intruders hints to the structure of your system. By default, display_errors = On.

在你的服务器上将 php.ini 文件中一个简单的设置改为 display_errors = Off 可以阻止将系统结构信息泄露给入侵者。在默认情况下这个设置为 display_errors = On.

You can find more information and error reporting options in the manual's Error Handling and Logging Functions Introduction section.

你可以找到更多有关错误报告的可选项以及信息,它们在手册的Error Handling and Logging Functions Introduction (错误处理以及loggin函数的介绍)章节

评论 (0) All

登陆 | 还没注册?