note 109834 added to function.die
| From: | HayleyWatson | Date: | Sat, 25 Aug 2012 16:29:33 +0000 |
| Subject: | note 109834 added to function.die | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190219@lists.php.net to get a copy of this message | ||
It is poor design to rely on die() for error handling in a web site because it results in an ugly
experience for site users: a broken page and - if they're lucky - an error message that is no
help to them at all. As far as they are concerned, when the page breaks, the whole site might as
well be broken.
If you ever want the public to use your site, always design it to handle errors in a way that will
allow them to continue using it if possible. If it's not possible and the site really is
broken, make sure that you find out so that you can fix it. die() by itself won't do either.
If a supermarket freezer breaks down, a customer who wanted to buy a tub of ice cream doesn't
expect to be kicked out of the building.
----
Server IP: 202.89.58.1
Probable Submitter: 125.237.149.231
----
Manual Page -- http://www.php.net/manual/en/function.die.php
Edit -- https://master.php.net/note/edit/109834
Del: integrated -- https://master.php.net/note/delete/109834/integrated
Del: useless -- https://master.php.net/note/delete/109834/useless
Del: bad code -- https://master.php.net/note/delete/109834/bad+code
Del: spam -- https://master.php.net/note/delete/109834/spam
Del: non-english -- https://master.php.net/note/delete/109834/non-english
Del: in docs -- https://master.php.net/note/delete/109834/in+docs
Del: other reasons-- https://master.php.net/note/delete/109834
Reject -- https://master.php.net/note/reject/109834
Search -- https://master.php.net/manage/user-notes.php