Reputation: 63626
Which is the case? Can anyone verify this?
Upvotes: 1
Views: 171
Reputation: 64
To make sure that a page is directly redirected, add a exit; after the header.
Upvotes: 1
Reputation: 2725
Refer the following link.
http://php.net/manual/en/function.header.php
Upvotes: 1
Reputation: 4623
Depends on output buffering, but the PHP interpreter still only uses them after having interpreted all the code before, just like a normal function. Still, there must not be any HTML before a header()
, or things will screw up.
Upvotes: 0
Reputation: 2106
If output buffering is disabled then it will be sent immediately. It must be sent before any other content (however you can perform processing logic before sending the header)
Upvotes: 0
Reputation: 157839
depends on the output_buffering setting
headers_sent()
function can verify
Upvotes: 0