note 26543 rejected from function.die by betz

From: Date: Mon, 04 Nov 2002 10:28:35 +0000
Subject: note 26543 rejected from function.die by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38946@lists.php.net to get a copy of this message
My friend had trouble with an RandomQuote script he got off some site. It used the die() Function when ever there was an error reading the file that had the quotes, what ever the error might be. Problem was it killed the rest of the HTML as well from that part of the page down. I took a look at the script and replaced all the die() functions with echo(), so insted of killing the script and HTML it just displayed the error message on the page. Changed die ("$infile was not found! check your paths!"); to echo "$infile was not found! check your paths!"; Simple as that ^^

« previous php.notes (#38946) next »