error_reporting=off 的老问题,郁闷中在本机调试没有问题,上传到服务器就趴窝了。可是服务器设置了error_reporting=off ,无权也不能修改。php探针 http://www.kuanv.net/php123.php一段测试程序 http://www.kuanv.net/php.phpphp.php的内容
CODE:<?php 
error_reporting(E_ALL ^ E_NOTICE);
$p = recursion(1);
echo $p;
$pp=sfadf(1);
echo $pp;
?>
问题,想要php.php输出全部应该输出的错误提示,怎么办 ?谢谢。

解决方案 »

  1.   

    <?php// Turn off all error reporting
    error_reporting(0);// 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 (bitwise 63 may be used in PHP 3)
    error_reporting(E_ALL);// Same as error_reporting(E_ALL);
    ini_set('error_reporting', E_ALL);?>
      

  2.   

    ini_set('display_errors',1);
    error_reporting('E_ALL');