Does die() successfully terminate the php script at that point or only with output bufferring?
would it be secure to do a:
if(!isset($_SESSION['logged_in'])){
die('you do not have permission to access this page.');
}
Does die() successfully terminate the php script at that point or only with output bufferring?
would it be secure to do a:
if(!isset($_SESSION['logged_in'])){
die('you do not have permission to access this page.');
}
From PHP.net :
Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit() is called.
Die is just an equivalent for exit().
In your case nothing would happen later since you probably haven't defined shutdown function to be something a guest isn't supposed to run :)
Yes, it is secure.
Frankly, die() is equal to regular script end. Calling die() is the same as if you just delete everything below this line.