Jump to content

Putting a die() after header(Location...)


Recommended Posts

I have seen the header("Location: http://example.com") takes some time to reach the browser but in the meantime the php script (if there is code after the header statement) continues to execute. So I recently started putting a die() immediately following the header() statement. I want to know if this a good practice? Do any of you experienced guys already do this?



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.