Home arrow PHP arrow Page 8 - Error Handling In PHP (part 2)

Endgame - PHP

The first part of this article demonstrated basic errorhandling in PHP, explaining the various error types and illustrating theprocess of building a custom error handler. But that's just the tip ofthe iceberg - this concluding part goes a step further, showing you totrigger your own errors, and log error messages to a file, database oremail address.

  1. Error Handling In PHP (part 2)
  2. Raising Hell
  3. Rolling Back
  4. Turning Up The Heat
  5. Of Form And Function
  6. Buffer Zone
  7. Back To Class
  8. Endgame
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 11
April 09, 2002

print this article


And that's about it from me. In this two-part article, you learned how to use PHP's error-handling API to exert fine-grained control over the way the language handles errors. You learned how to control the display of specific error types, how to customize the manner in which they're handled, and how to raise errors of your own. Next, you learnt how to log errors, write them to a file and email them out to all and sundry. And, as if all that wasn't enough, the final section of this article demonstrated the process of creating a robust, scalable error-handling system for a Web application.

In case you'd like to know more about the material discussed in this article, consider checking out the following links:

A description of PHP error types, at http://www.php.net/manual/en/phpdevel-errors.php

Gyozo Papp's ErrorHandler class, at http://www.phpclasses.org/browse.html/package/345

PHP output buffering, at http://www.php.net/manual/en/ref.outcontrol.php

PHP's MySQL functions, at http://www.php.net/manual/en/ref.mysql.php

PHP's file handling functions, at http://www.php.net/manual/en/ref.filesystem.php

I hope you enjoyed this article, and that you found it interesting and informative. Till next time...be good!

Note: All examples in this article have been tested on Linux/i586 with Apache 1.3.20 and PHP 4.1.1. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!

>>> More PHP Articles          >>> More By icarus, (c) Melonfire

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: