On 5/8/06, John Meyer <john.l.meyer@xxxxxxxxx> wrote:
Is there anyway to make PHP normally suppress errors, but a piece of code that would show errors on a particular page? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Turn display errors off in your php.ini on production servers, then you can use... ini_set('display_errors', true); ...if you must. A better way is to use the set_error_handler() function to setup your own custom error handler that will handle errors gracefully. Within that you can also go a step further and add logging features to let you know errors. I built an error handler function that emails me on any errors that my script generates so that once I leave a job I will know about problems. I'm not sure what you're trying to do, but letting end users see raw php erros is a bad idea because it gives out server path information and other sensitive details that people could potentially exploit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php