Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts

    PHP Header solutions

    Hello. I'm having a hard time working with the header() function. I use it often, but I get that common problem due to use of the function after an outputted head tag I suppose. On the php manual, it states "Remember that header() must be...", but what are some ways of getting around this?
    For most of my codes, I use
    PHP Code:
    <html>
    <head></head>
    <body>
    <?php include("incpage.php"); ?>//where this incpage.php contains a header() function
    </body>
    </html>

  • #2
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,389
    Thanks
    8
    Thanked 1,077 Times in 1,068 Posts
    buffering the output ... ob_start()

    See this:
    http://www.weberdev.com/ViewArticle/...ering-with-PHP


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •