• George Moureau

    (@georgepiccexcellencecom)


    I use header(“Location: xxxxxxxxx”); to move around internally to various php files. I have a conflict with get_header() that I’ve worked around, mainly by not having header() and get_header() in the same file together. This works with all browsers EXCEPT, yep you guessed it, IE. I have to put the get_header() function after some include calls (which contains the header() function), else I get a blank screen. In IE, it’s as if the get_header() function doesn’t implement at all, I get no styles from my css file hence the page is wacked out. If I move the get_header() function above the includes, no problem, except the include files and their functions no longer work. what a mess.

    Any thoughts or clues to making things work with IE would be appreciated.

    George

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter George Moureau

    (@georgepiccexcellencecom)

    Okay, further research reveals that php header() function has to come first before any hmtl code. Each wordpress page begins with wordpress function – get_header, which obviously loads the header information (html) for each page. So I move the get_header() function below any include files and the php header() function works fine EXCEPT in Internet Explorer (v9). Everything gets screwed up with formatting if I don’t put the get_header() function as the first item called on a php page, just in IE, all other browsers are fine.

    Any thoughts on this would be appreciated. Are there compatibility codes that can be put in the header.php file that would correct for this?

    George

    Try using wp_redirect rather than the built in php function.

    Edit: Remember, WordPress is a template driven system, rather than a single static/dynamic page. The urls are just a command to the system rather than a file call.

    Thread Starter George Moureau

    (@georgepiccexcellencecom)

    Thanks Andrew, that redirect works however it still has the same problem of html output disabling the redirect. I found through further reading that turning on the output buffer (ob_start()) in my header.php file allows it to work with php 4.4 and newer and IE. Looks like other browsers must turn on the output buffer automatically, that’s my guess anyway, cause IE is the only browser that has a problem…

    Thanks again…

    George

    php 4.4 o0? Time to upgrade!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘conflict with get_header(), php header function and Internet Explorer’ is closed to new replies.