note 26543 added to function.die
| From: | cyberdragon at softhome dot net | Date: | Mon, 04 Nov 2002 07:08:03 +0000 |
| Subject: | note 26543 added to function.die | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38941@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 ^^
--
http://www.php.net/manual/en/function.die.php
http://master.php.net/manage/user-notes.php?action=edit+26543
http://master.php.net/manage/user-notes.php?action=delete+26543
http://master.php.net/manage/user-notes.php?action=reject+26543