Horst Azeglio Posted May 30, 2006 Share Posted May 30, 2006 Is it possible to disable warning errors with a php function? I cannot access PHP.ini Quote Link to comment https://forums.phpfreaks.com/topic/10790-disable-warning-errors/ Share on other sites More sharing options...
poirot Posted May 30, 2006 Share Posted May 30, 2006 Yes, you can use error_reporting(0)[a href=\"http://www.php.net/error_reporting\" target=\"_blank\"]http://www.php.net/error_reporting[/a] Quote Link to comment https://forums.phpfreaks.com/topic/10790-disable-warning-errors/#findComment-40337 Share on other sites More sharing options...
Horst Azeglio Posted May 30, 2006 Author Share Posted May 30, 2006 Thanks a lot, it works perfectly :) Quote Link to comment https://forums.phpfreaks.com/topic/10790-disable-warning-errors/#findComment-40339 Share on other sites More sharing options...
poirot Posted May 30, 2006 Share Posted May 30, 2006 And if you want to disable error reporting for certain functions only, use error supression:[code]@file_get_contents('file.txt');[/code]This way it won't give you errors. Quote Link to comment https://forums.phpfreaks.com/topic/10790-disable-warning-errors/#findComment-40345 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.