Page 1 of 1

php on error handler

Posted: Wed Jul 21, 2010 3:22 pm
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
:)

Re: php on error handler

Posted: Wed Jul 21, 2010 4:54 pm
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