581Chapter 31Exceptions and Error Handlingerror_log()accepts one of four (Ftp web hosting)
581Chapter 31Exceptions and Error Handlingerror_log()accepts one of four integers as the second parameter, which sets the messagetype in conjunction with the third, or location, parameter: 0 uses the operating system s system logging mechanism1 sends the error to a specified e-mail address (extra headers may be added as afourth parameter) 2 sends the error through PHP s debugging connection (remote debugging must beenabled) 3 error message is appended to a destination error log fileSummaryError handling continues to become easier and more uniform with the ongoing developmentof PHP. The Exception class provides a means of separating error conditions, or exceptions, from the flow of the application. Using the try/catch block and custom-defined Exception sub- classes, errors can be intercepted and even recovered. Previous versions of PHP also provide a measure of error handling and reporting. User errorscan be triggered as an alternative to throwing an exception, and custom error handlers canprovide a better user experience as well as useful debugging information. Logging and debug- ging are crucial to successful exception and error handling. …
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.