只能通过htaccess在php中启用错误显示
我正在网上testing一个网站。
现在,错误没有显示(但我知道它们存在)。
我只能访问.htaccess文件。 
 我如何使所有错误显示使用我的.htaccess文件 
编辑
 我将这些行添加到我的.htaccess : 
 php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on 
现在显示页面
内部服务器错误
的.htaccess:
 php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_flag log_errors on php_value error_log /home/path/public_html/domain/PHP_errors.log 
 php_flag display_errors on 
打开错误的实际显示。
要设置显示的错误types,您需要使用:
 php_value error_reporting <integer> 
结合这个页面的整数值: http : //php.net/manual/en/errorfunc.constants.php
请注意,如果您使用-1来表示整数,则会显示所有错误,并且在添加新types的错误时可以certificate它们。
我想增加更多的细节到现有的答案:
 # PHP error handling for development servers php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_flag log_errors on php_flag ignore_repeated_errors off php_flag ignore_repeated_source off php_flag report_memleaks on php_flag track_errors on php_value docref_root 0 php_value docref_ext 0 php_value error_log /full/path/to/file/php_errors.log php_value error_reporting -1 php_value log_errors_max_len 0 
给日志文件授予777或755权限,然后添加代码
 <Files php_errors.log> Order allow,deny Deny from all Satisfy All </Files> 
在.htaccess结尾。 这将保护您的日志文件。 这些选项适合于开发服务器。 对于生产服务器,不应该向最终用户显示任何错误。 所以改变显示标志closures。
有关更多信息,请点击此链接: 通过htaccess进行高级PHPerror handling
如果你只想看到致命的运行时错误:
 php_value display_errors on php_value error_reporting 4 
如果你正在谈论PHP错误,只需在脚本的顶部添加它:
 error_reporting(E_ALL); 
 编辑:如果你的意思是你不能编辑你的脚本,那么你将需要在你的htaccess文件中使用php_flag 。 见http://perishablepress.com/press/2007/12/17/how-to-enable-php-error-logging-via-htaccess/