If you are using auto append file (auto_append_file ="_end.php";) on your php.ini, be carefull on using die anywhere you want your appended file to be called. Souds obvious now but took me a good 1 hour to realise why one script was not appending end file as expected.
I solved using `return` instead; it works anywhere not just inside functions and the effect is pretty much the same as die.
Opis
This language construct is equivalent to exit().
Parametry
Ta funkcja nie posiada parametrów.
die
ecziegler at gmail.com
12-May-2008 03:06
12-May-2008 03:06
jbailey at raspberryginger dot com
20-Jan-2007 06:33
20-Jan-2007 06:33
die doesn't prevent destructors from being run, so the script doesn't exit immediately, it still goes through cleanup routines.
28-Sep-2004 06:36
Perhaps the Coldfusion query below can be answered as follows:
---------
(From the "User Contributed Notes" for the PHP construct "exit")
nospam at mydomain dot com
27-Sep-2004 10:12
Using return instead of exit is to prefer when you want the script that you have included inside another script to die but continue to execute the main script.
// Radcliff
---------
matthias dot schniedermeyer at telefonica dot de
14-Oct-2003 04:29
14-Oct-2003 04:29
To get a perl-like die you can/should append this snipped
. " File: " . __FILE__ . " on line: " . __LINE__
e.g.
die ("Error" . " File: " . __FILE__ . " on line: " . __LINE__);
