Add Comment
|
Related Links
|
TrackBack
Turn Off Warning/Error Reporting Temporary in PHPSometimes, your server side scripts performs operation that are not guaranteed to succeed all the time. For example, connection to another remote service. When the operation fails, PHP provides a warning or a error message. But that message is shown to the web user and may contain sensitive information that you don't want your visitor to see. The trick to prevent leaking sensitive information in this situation is to temporarily turn off the warning and error messages. Following is an example of how to do it: $cerl = error_reporting (); The first line asks for the current error reporting level and stores it. The second line disables all warning and error display. Finally, the last line sets the error reporting level back to the way it is. Chieh Cheng I just learned about the error_reporting function today, since it helped me remove a harmless warning that was showing up on a website. Also learned about the "@" operator. Good source of info right here on this topic: http://www.programmerinterview.com/index.php/php-questions/h . . . Thanks for the post! Tony
Add Comment
|
Related Links
|
TrackBack
Did your message disappear? Read the Forums FAQ. Add CommentSpam Control | * indicates required field TrackBackTrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites. Send Ping | TrackBack URL | Spam Control No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here. Messages, files, and images copyright by respective owners. |
Products
|
Services
168 Users Online
|
Copyright © 1996 - 2024. All Rights Reserved. |