...

View Full Version : error supressed?



kab_184
04-23-2004, 11:47 AM
hi

is there any way to stop error/warning appearing on php page.?

Like the parse errors ....permission error...?
so that script with error is not executed and to the user nothing ever went wrong on that page??

is it possible ?

bcarl314
04-23-2004, 12:29 PM
Usually adding an "@" symbol in front of a function call will do it.

Otherwise, check out the error reporting info on the php.net site. There are config directives you can change on the fly.
( http://www.php.net/manual/en/function.error-reporting.php )

kab_184
04-23-2004, 12:51 PM
ya thanks for the page

so i can turn off the error reporting
nowto the visitor no error shows up but
is there someway that if the error happens an email alert is sent at a specified email address...to admin only?

// Turn off all error reporting
error_reporting(0);

how can i send the error occured in email to the admin only?

firepages
04-23-2004, 03:06 PM
you can define your own error handling rules with PHPs custom error handling
http://be.php.net/manual/en/ref.errorfunc.php

note you could also trap errors in your code i.e.



<?
@mysql_query($sql);
if(mysql_error()){
mail("admin@blah.com" ... etc
}
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum