how to stop showing php errors don\'t display script error code

RegisterLogin
how to stop showing php errors don\'t display script error code
Post Description: how to stop showing php errors don\'t display script error code
Tags: how, to, stop, showing, php, errors, don\'t, display, script, error, code
This Post Was Posted On Feb 29, 2008 By web hosting #1264
have you noticed sometimes you are writing your scripts and then php shows you an error and the path of the file name with the line number.

sometimes its not a good idea to show this imformation because someone can use it against your site.

so there's a way you can hide the code on your php script by putting the folloing function at the begining of your scripts:

CODE:
ini_set('display_errors', 0);


like for example, i had a script and it kept showing me this error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'adndhsd'@'localhost' (using password: YES) in C:htdocsscriptinstallindex.php on line 151

after i put the ini_set functionk, php stopped showing me the errors
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Wed Dec 21, 2011 9:35 am
Powered by: Webune Forums V3