小问题 error_reporting配置错误信息回报的等级。语法: int error_reporting(int [level]);返回值: 整数函数种类: PHP 系统功能 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用来设定错误讯息回报的等级,参数 level 是一个整数的位元遮罩 (bitmask),见下表。遮罩值 表示名称 1 E_ERROR 2 E_WARNING 4 E_PARSE 8 E_NOTICE 16 E_CORE_ERROR 32 E_CORE_WARNING E_NOTICE 表示一般情形不记录,只有程式有错误情形时才用到,例如企图存取一个不存在的变数,或是呼叫 stat() 函式检视不存在的档案。 E_WARNING 通常都会显示出来,但不会中断程式的执行。这对除错很有效。例如:用有问题的常规表示法呼叫 ereg()。 E_ERROR 通常会显示出来,亦会中断程式执行。意即用这个遮罩无法追查到记忆体配置或其它的错误。 E_PARSE 从语法中剖析错误。 E_CORE_ERROR 类似 E_ERROR,但不包括 PHP 核心造成的错误。 E_CORE_WARNING 类似 E_WARNING,但不包括 PHP 核心错误警告。 -------------------------------------------------------------------------------- 设置当前脚本错误提示的相关设置上面是应该是关闭php编译错误提示。就是有编译错误,也不会在页面中提示 下面是代码对应的设置项1 E_ERROR 2 E_WARNING 4 E_PARSE 8 E_NOTICE 16 E_CORE_ERROR 32 E_CORE_WARNING 64 E_COMPILE_ERROR 128 E_COMPILE_WARNING 256 E_USER_ERROR 512 E_USER_WARNING 下面是上面设置项表示的意思:; E_ALL - All errors and warnings; E_ERROR - fatal run-time errors; E_WARNING - run-time warnings (non-fatal errors); E_PARSE - compile-time parse errors; E_NOTICE - run-time notices (these are warnings which often result; from a bug in your code, but it's possible that it was; intentional (e.g., using an uninitialized variable and; relying on the fact it's automatically initialized to an; empty string); E_CORE_ERROR - fatal errors that occur during PHP's initial startup; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's; initial startup; E_COMPILE_ERROR - fatal compile-time errors; E_COMPILE_WARNING - compile-time warnings (non-fatal errors); E_USER_ERROR - user-generated error message; E_USER_WARNING - user-generated warning message; E_USER_NOTICE - user-generated notice message; 结帖了,我还要补充,因为上面不全面:0代表E_Allerror_reporting(0)关闭所有错误和警告 正则替换的问题 有关PHP Pack和服务器配置... 谁有站内发信息的源码呀.或者怎么写啊./ php怎样判断复选框是否被复选了? php(while 循环中换行) 小弟菜鸟,求高手回答我这个弱智问题 探讨一下函数的变量付值调用哪个比较好 都出的数据怎么重复利用 如下代码如何会出问题?急!!!! 怎么样把我的数据库结构传到服务器上呀 各位老大,帮俺写个函数 请教一个CSS问题,鼠标移动到超连接时显示I形,按下左键时为手形,如何改鼠标称到超连接时为手形?谢谢。
1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING E_NOTICE 表示一般情形不记录,只有程式有错误情形时才用到,例如企图存取一个不存在的变数,或是呼叫 stat() 函式检视不存在的档案。
E_WARNING 通常都会显示出来,但不会中断程式的执行。这对除错很有效。例如:用有问题的常规表示法呼叫 ereg()。
E_ERROR 通常会显示出来,亦会中断程式执行。意即用这个遮罩无法追查到记忆体配置或其它的错误。
E_PARSE 从语法中剖析错误。
E_CORE_ERROR 类似 E_ERROR,但不包括 PHP 核心造成的错误。
E_CORE_WARNING 类似 E_WARNING,但不包括 PHP 核心错误警告。 --------------------------------------------------------------------------------
1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING
64 E_COMPILE_ERROR
128 E_COMPILE_WARNING
256 E_USER_ERROR
512 E_USER_WARNING 下面是上面设置项表示的意思:
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;