die function

From: Date: Mon, 21 Mar 2005 10:55:34 +0000
Subject: die function
Groups: php.general 
Request: Send a blank email to php-general+get-211175@lists.php.net to get a copy of this message
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 --

« previous php.general (#211175) next »