die function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux