help with displaying errors

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MonkeyManx
Forum Newbie
Posts: 4
Joined: Tue Jul 09, 2002 9:02 pm
Location: Phoenix, Arizona
Contact:

help with displaying errors

Post by MonkeyManx »

Is there any way to tell the php script not to show errors?
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Do you mean something like http://se.php.net/error_reporting and/or http://se.php.net/manual/en/ref.errorfunc.php ?

Another tip is the following:

Code: Select all

<?php
 $foo = @fopen(slapp_kitty);
?>
Note the @ before the function.

Do however read up on errorhandling before using this or changing any error settings. Errors are there for a reason and shouldn't really be ignored as a "quick and swift" solution to any problem. Like curing the symptom instead of the actual disease...

(Ignore the spelling, it's late)
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

You should be coding to check and test against errors so that they dont appear, not just hiding them.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

very true when develepping you should have E_ALL and when showing the public remove errors
Post Reply