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 --

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to