How To Stop Showing Php Errors Don't Display Script Error Code


How To Stop Showing Php Errors Don't Display Script Error Code
  Forums Index
      » PHP Forums
        » » how to stop showing php errors don't display script error code



How To Stop Showing Php Errors Don't Display Script Error Code
Post Description:
Post Tags: how, to, stop, showing, php, errors, dont, display, script, error, code, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 622 Times Since Tue Jul 03, 2007 9:24 am Posted By hostman with 0 replies
Next Post »» php script to test mysql database connection check db connect
How To Stop Showing Php Errors Don't Display Script Error Code
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
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About How To Stop Showing Php Errors Don't Display Script Error Code






(0) Comments