error_reporting(255); 是列出所以提示 error_reporting(0); 是不显示所以提示 建议使用 error_reporting(7); 只显示严重错误 1 E_ERROR 致命的运行时错误 2 E_WARNING 运行时警告(非致命性错误) 4 E_PARSE 编译时解析错误 8 E_NOTICE 运行时提醒(经常是bug,也可能是有意的) 16 E_CORE_ERROR PHP启动时初始化过程中的致命错误 32 E_CORE_WARNING PHP启动时初始化过程中的警告(非致命性错) 64 E_COMPILE_ERROR 编译时致命性错 128 E_COMPILE_WARNING 编译时警告(非致命性错) 256 E_USER_ERROR 用户自定义的致命错误 512 E_USER_WARNING 用户自定义的警告(非致命性错误) 1024 E_USER_NOTICE 用户自定义的提醒(经常是bug,也可能是有意的) 2048 E_STRICT 编码标准化警告(建议如何修改以向前兼容) 4096 E_RECOVERABLE_ERROR 接近致命的运行时错误,若未被捕获则视同E_ERROR 6143 E_ALL 除E_STRICT外的所有错误(PHP6中为8191,即包含所有)
|
分享到:
相关推荐
主要介绍了PHP中error_reporting函数用法详细介绍的相关资料,需要的朋友可以参考下
在PHP中所有的报错信息可以用error_reporting()这个函数来设置: 它的参数有字符串和数字两种表示方法,共14个等级,但是呢,我看使用其他数字貌似也可以,起初我以为它指的是一定的报错区间,后来,终于发现了其中...
在看帝国cms的connect.php是发现第一句是error_reporting(E_ALL ^ E_NOTICE);以前也没注意过这个语句,知道是设置错误提示的,但不清楚具体怎样设置使用。下面从网上摘抄了些东西,总结了一下。
error_reporting() 函数规定报告哪个错误 。该函数设置当前脚本的错误报告级别。该函数返回旧的错误报告级别。 首先要知道error_reporting()函数是用来设置错误级别并返回当前级别的。它有14个错误级别,如下: 1 E...
今天学习CI框架过程中遇到个问题: A PHP Error was encountered Severity: Notice Message: Undefined variable: user 一般在默认的普通PHP文件中输出一个未定义声明的变量是不会报错误的,但在codeigniter框架下却...
error_reporting(0); ob_start(); session_start(); //打开会话 $HOST="localhost"; $USER="admin"; $PASS="admin"; $DBNAME="shopping"; $dblink=@mysql_connect($HOST,$USER,$PASS) or die("数据库链接...
error_reporting(-1); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); date_default_timezone_set('Europe/Brussels'); if (!is_file($autoloadFile = __DIR__ . '/../vendor...
php批量上传图片php批量上传图片php批量上传图片php批量上传图片
error_reporting(E_ALL | E_STRICT); // Ensure that composer has installed all dependencies if (!file_exists(dirname(__DIR__) . DIRECTORY_SEPARATOR . '/vendor/autoload.php')) { die(...
error_reporting(E_ALL); // we first include the upload class, as we will need it here to deal with the uploaded file include('../src/class.upload.php'); // set variables $dir_...
error_reporting(E_ALL | E_STRICT); // Ensure that composer has installed all dependencies if (!file_exists(dirname(__DIR__) . DIRECTORY_SEPARATOR . '/vendor/autoload.php')) { die(...
中 error_reporting 和 display_errors 的设置、error_reporting() 函数、ini_set() 函数 外,还可以使用错误抑制符@ 屏蔽错误的输出。 @ 加在任何会产生错误的表达式之前。 【通过 trigger_error 触发 PHP 错误】 ...
error_reporting(E_ALL); function ErrHandler($errorno, $errorstr, $errorfile, $errorline) { $display = true; $notify = false; $halt_script = false; $error_msg = The $errorno error is occurring ...
error_reporting (0); register_shutdown_function($err = 'my_error_handler') OR set_error_handler($err,E_ALL); // 同时注册两个函数. // 函数参数错误 $original = unserialize ( array(423142,2134234)); // ...
error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 'On'); chdir(__DIR__); $configFile = 'server-config.php'; if (!file_exists($configFile) || !is_readable($configFile)) { ...