Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

built in error reporting

Status
Not open for further replies.

MysticFallout

Technical User
Sep 21, 2002
14
US
in perl you can use

Code:
die("Blah: $!");

is there anything like this in PHP? to give a bit more information on an error than just doing like so?

Code:
die("Couldnt do something");
 
well, it gives additional errors.

Code:
open(DATA, '$url') || die(&quot;Could not open $url <b>$!</b>&quot;);

will produce something like

Code:
Could not open thebad.txt No such file or directory at rmp.cgi line 29.

without $! it would only show

Code:
Could not open thebad.txt

im just curious, had never heard of anything like it in PHP. :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top