Re: PHP error message without revealing the file path??
| From: | Daniel Convissor | Date: | Mon, 16 Oct 2000 22:32:26 +0000 |
| Subject: | Re: PHP error message without revealing the file path?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20481@lists.php.net to get a copy of this message | ||
Hey Sascha:
> Well, i wonder how to achieve this pretty "your script" instead of revealing
> the full pathname.
Well here's one thing you can do, but this just the errors you ask it to look
out for. All other errors will be completely ignored...
You can ensure track_errors is enabled and set error_reporting(0) at the top
of your script. Make a function, named Error($File,$Line) that displays the
nice message you want. Then, when you have situations where errors may
arise, do an:
$php_error = "";
# some error prone procedure here...
if($php_errormsg){
Error(__FILE__,__LINE__);
}
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409