chrisbraddock Posted July 22, 2009 Share Posted July 22, 2009 I would expect this to fail (which it does on my local Ubuntu setup): <html> <body>hello <?php header("location: /"); ?> In my local XP setup it "works" as does it on a CentOS web host I've tested. I don't understand why it works at all... Quote Link to comment https://forums.phpfreaks.com/topic/167030-solved-headers-alredy-sent-why-does-this-work/ Share on other sites More sharing options...
Daniel0 Posted July 22, 2009 Share Posted July 22, 2009 It would work if you've configured PHP to implicitly start output buffering when execution starts. See the output_buffering directive in php.ini. Quote Link to comment https://forums.phpfreaks.com/topic/167030-solved-headers-alredy-sent-why-does-this-work/#findComment-880664 Share on other sites More sharing options...
chrisbraddock Posted July 22, 2009 Author Share Posted July 22, 2009 Thank-you!!! Quote Link to comment https://forums.phpfreaks.com/topic/167030-solved-headers-alredy-sent-why-does-this-work/#findComment-880665 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.