php on error handler

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
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

php on error handler

Post by srdva59 »

hi,
sometimes when i run a script i receive this error:

Fatal error: Allowed memory size i need to send a alert some like this:

echo "<script> alert ( ' '); <script>";
when a error is detected
there is a error handler in php?
something like this: on error goto x
thanks a lot for your help
:)
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: php on error handler

Post by yacahuma »

What are you doing when you get that error?

In a production environment you should really set php.ini to log errors.

When coding always check your return values.

take a look at http://www.php.net/manual/en/function.s ... andler.php
Post Reply