Dysan Posted March 19, 2008 Share Posted March 19, 2008 Hi, Upon an error occurring with my PHP scripts, can do I hide the full path of the cooperate file within the error message? Link to comment https://forums.phpfreaks.com/topic/96972-error-message-hide-full-file-path/ Share on other sites More sharing options...
BlueSkyIS Posted March 19, 2008 Share Posted March 19, 2008 you can incorporate error handling, but i suggest not having any errors. Link to comment https://forums.phpfreaks.com/topic/96972-error-message-hide-full-file-path/#findComment-496251 Share on other sites More sharing options...
Dysan Posted March 19, 2008 Author Share Posted March 19, 2008 What do you mean by that? Is it possible to turn off error message completely? - How? Link to comment https://forums.phpfreaks.com/topic/96972-error-message-hide-full-file-path/#findComment-496261 Share on other sites More sharing options...
BlueSkyIS Posted March 19, 2008 Share Posted March 19, 2008 what i meant is don't have errors in your code. debug and remove all possible errors. things shouldn't break, you shouldn't need to hide errors. but to turn off error reporting, you can either set the value in php.ini or use a command at the top of your code: error_reporting(0); Link to comment https://forums.phpfreaks.com/topic/96972-error-message-hide-full-file-path/#findComment-496264 Share on other sites More sharing options...
PFMaBiSmAd Posted March 19, 2008 Share Posted March 19, 2008 Adjusting the error reporting level will also prevent the logging of the errors so you will have no record of what happened when something goes wrong. The display_errors setting should instead be turned off to prevent them from being sent to the browser, but they will still be logged. Well written code does not normally generate any errors/warnings/notices. If you are receiving error messages, it indicates your code is not working correctly. Simply hiding the errors will still mean that your code is not working, but now you don't know what is going wrong. Link to comment https://forums.phpfreaks.com/topic/96972-error-message-hide-full-file-path/#findComment-496390 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.