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... 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. 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!!! 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
Archived
This topic is now archived and is closed to further replies.