You are here: die function « PHP « IT news, forums, messages
die function

Posted by Barbara Picci on 10/19/34 11:11

Hi all,

I have a machine that must insert in cron in a mysql db in another
remote machine.
The problem is that I cannot know if the connection in the first
machine (adsl) go down because no entry in the machine log is
generated. I would like to redirect the die function in a e-mail that
say me what happens.

I found a script
<?php
function die_script($errmsg)
{
print $errmsg . "</body></html>";
die;
}
?>
and I tried to insert a mail() before die function but I cannot call
the function in this way:

or die("Connection failed: " . die_script());

But no email is generated.

How can I do?


Thanks
Barbara
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация