1

谁能告诉我如何编写代码来抑制 htaccess 文件中的以下错误?

  • 警告
  • 电子通知
  • 致命错误
4

3 回答 3

2
php_value error_reporting 0
php_flag display_errors Off
于 2013-02-01T12:54:14.143 回答
1

To display error messages caused by your PHP script you can include these lines of code:

ini_set('display_errors',1); 
error_reporting(E_ALL);
于 2013-02-01T12:58:17.140 回答
1

使用以下error_reporting()功能集启用错误。

<?php

    // Report simple running errors
    error_reporting(E_ERROR | E_WARNING | E_PARSE);

    // Reporting E_NOTICE can be good too (to report uninitialized
    // variables or catch variable name misspellings ...)
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

    // Report all errors except E_NOTICE
    // This is the default value set in php.ini
    error_reporting(E_ALL ^ E_NOTICE);

    // Report all PHP errors (see changelog)
    error_reporting(E_ALL);

    // Report all PHP errors
    error_reporting(-1);

    // Same as error_reporting(E_ALL);
    ini_set('error_reporting', E_ALL);

    ?>
于 2013-02-01T12:52:07.887 回答