ImageVerifierCode 换一换
格式:DOCX , 页数:21 ,大小:23.50KB ,
资源ID:28960559      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/28960559.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(PHP函数库分类十五.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

PHP函数库分类十五.docx

1、PHP函数库分类十五PHP函数库分类十五5.PHP错误处理 debug_backtrace- Generates a backtracedebug_backtrace(PHP 4 = 4.3.0, PHP 5)debug_backtraceGenerates a backtrace说明arraydebug_backtrace(int$options= DEBUG_BACKTRACE_PROVIDE_OBJECT,int$limit= 0 )debug_backtrace()generates a PHP backtrace.参数optionsAs of 5.3.6, this paramete

2、r is a bitmask for the following options:debug_backtrace()optionsDEBUG_BACKTRACE_PROVIDE_OBJECTWhether or not to populate the object index.DEBUG_BACKTRACE_IGNORE_ARGSWhether or not to omit the args index, and thus all the function/method arguments, to save memory.Before 5.3.6, the only values recogn

3、ized areTRUEorFALSE, which are the same as setting or not setting theDEBUG_BACKTRACE_PROVIDE_OBJECToption respectively.limitAs of 5.4.0, this parameter can be used to limit the number of stack frames returned. By default (limit=0) it returns all stack frames.返回值Returns an array of associativearrays.

4、 The possible returned elements are as follows:Possible returned elements fromdebug_backtrace()名字类型说明functionstringThe current function name. See also_FUNCTION_.lineintegerThe current line number. See also_LINE_.filestringThe current file name. See also_FILE_.classstringThe currentclassname. See als

5、o_CLASS_objectobjectThe currentobject.typestringThe current call type. If a method call, - is returned. If a static method call, : is returned. If a function call, nothing is returned.argsarrayIf inside a function, this lists the functions arguments. If inside an included file, this lists the includ

6、ed file name(s).更新日志版本说明5.4.0Added the optional parameterlimit.5.3.6The parameterprovide_objectchanged tooptionsand additional optionDEBUG_BACKTRACE_IGNORE_ARGSis added.5.2.5Added the optional parameterprovide_object.5.1.1Added the currentobjectas a possible return element.范例Example #1debug_backtrac

7、e()exampleResults similar to the following when executing/tmp/b.php:Hi: friendarray(2) 0=array(4) file = string(10) /tmp/a.php line = int(10) function = string(6) a_test args= array(1) 0 = &string(6) friend 1=array(4) file = string(10) /tmp/b.php line = int(2) args = array(1) 0 = string(10) /tmp/a.p

8、hp function = string(12) include_once debug_print_backtrace- Prints a backtracedebug_print_backtrace(PHP 5)debug_print_backtracePrints a backtrace说明voiddebug_print_backtrace(int$options= 0,int$limit= 0 )debug_print_backtrace()prints a PHP backtrace. It prints the function calls, included/required fi

9、les andeval()ed stuff.参数optionsAs of 5.3.6, this parameter is a bitmask for the following options:debug_print_backtrace()optionsDEBUG_BACKTRACE_IGNORE_ARGSWhether or not to omit the args index, and thus all the function/method arguments, to save memory.limitAs of 5.4.0, this parameter can be used to

10、 limit the number of stack frames printed. By default (limit=0) it prints all stack frames.返回值没有返回值。更新日志版本说明5.4.0Added the optional parameterlimit.5.3.6Added the optional parameteroptions.范例Example #1debug_print_backtrace()example以上例程的输出类似于:#0 c() called at /tmp/include.php:10#1 b() called at /tmp/i

11、nclude.php:6#2 a() called at /tmp/include.php:17#3 include(/tmp/include.php) called at /tmp/test.php:3 error_get_last- Get the last occurred errorerror_get_last(PHP 5 = 5.2.0)error_get_lastGet the last occurred error说明arrayerror_get_last(void)Gets information about the last error that occurred.返回值Re

12、turns an associative array describing the last error with keys type, message, file and line. If the error has been caused by a PHP internal function then the message begins with its name. ReturnsNULLif there hasnt been an error yet.范例Example #1 Anerror_get_last()example以上例程的输出类似于:Array( type = 8 mes

13、sage = Undefined variable: a file = C:WWWindex.php line = 2) error_log- Send an error message somewhereerror_log(PHP 4, PHP 5)error_logSend an error message somewhere说明boolerror_log(string$message,int$message_type= 0,string$destination,string$extra_headers )Sends an error message to the web servers

14、error log or to a file.参数messageThe error message that should be logged.message_typeSays where the error should go. The possible message types are as follows:error_log()log types0messageis sent to PHPs system logger, using the Operating Systems system logging mechanism or a file, depending on what t

15、he error_log configuration directive is set to. This is the default option.1messageis sent by email to the address in thedestinationparameter. This is the only message type where the fourth parameter,extra_headersis used.2No longer an option.3messageis appended to the filedestination. A newline is n

16、ot automatically added to the end of themessagestring.4messageis sent directly to the SAPI logging handler.destinationThe destination. Its meaning depends on themessage_typeparameter as described above.extra_headersThe extra headers. Its used when themessage_typeparameter is set to1. This message ty

17、pe uses the same internal function asmail()does.返回值成功时返回TRUE, 或者在失败时返回FALSE.更新日志版本说明5.2.7The possible value of 4 was added tomessage_type.范例Example #1error_log()examples error_reporting- Sets which PHP errors are reportederror_reporting(PHP 4, PHP 5)error_reportingSets which PHP errors are reported说

18、明interror_reporting(int$level )Theerror_reporting()function sets the error_reporting directive at runtime. PHP has many levels of errors, using this function sets that level for the duration (runtime) of your script. If the optionallevelis not set,error_reporting()will just return the current error

19、reporting level.参数levelThe new error_reporting level. It takes on either a bitmask, or named constants. Using named constants is strongly encouraged to ensure compatibility for future versions. As error levels are added, the range of integers increases, so older integer-based error levels will not a

20、lways behave as expected.The available error level constants and the actual meanings of these error levels are described in the predefined constants.返回值Returns the old error_reporting level or the current level if nolevelparameter is given.更新日志版本说明5.4.0E_STRICTbecame part ofE_ALL.5.3.0E_DEPRECATEDan

21、dE_USER_DEPRECATEDintroduced.5.2.0E_RECOVERABLE_ERRORintroduced.5.0.0E_STRICTintroduced (not part ofE_ALL).范例Example #1error_reporting()examples注释WarningMost ofE_STRICTerrors are evaluated at the compile time thus such errors are not reported in the file where error_reporting is enhanced to includeE

22、_STRICTerrors (and vice versa).TipPassing in the value-1will show every possible error, even when new levels and constants are added in future PHP versions. TheE_ALLconstant also behaves this way as of PHP 5.4. restore_error_handler- Restores the previous error handler functionrestore_error_handler(

23、PHP 4 = 4.0.1, PHP 5)restore_error_handlerRestores the previous error handler function说明boolrestore_error_handler(void)Used after changing the error handler function usingset_error_handler(), to revert to the previous error handler (which could be the built-in or a user defined function).返回值This fun

24、ction always returnsTRUE.范例Example #1restore_error_handler()exampleDecide ifunserialize()caused an error, then restore the original error handler.以上例程会输出:Invalid serialized value.注释Note:Callingrestore_error_handler()from theerror_handlerfunction is ignored. restore_exception_handler- Restores the previously defined exception handler functionrestore_exception_handler(PHP 5)restore_exception_handlerRestores the

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1