Error handling

A

Anonymous

Guest
Hi !
I hope someone can help a PHP beginner like me !
In an 'include' file of mine I wrote the following:

$fp = fopen("filename","r") or die (ERROR: file currently not available")

When the file is not available I get 2 messages, the one from the PHP compiler and my ERROR message.
Question 1: is it possible to get just my message, without the PHP compiler message ?
Question 2: I noticed that the effect of the "die" message is the jumping back to the calling PHP file.
Is it possible to jump or exit out of the whole called web page ?

Thank you for your patience and availability

Gian Piero
 
Back
Top