• 0

PHP Includes with IE... doesn't make sense!


Question

PHP is SERVER SIDE.

So I don't get this.

If I include a CSS file via PHP

include('includes/css.inc');

the page displays one way (wrong)

but if I type the same code in css.inc by cutting and pasting it, it works.

I just don't understand!

You can see the same thing with different code too:

Compare http://neosmart.ath.cx/sulayman/index.php to http://neosmart.ath.cx/sulayman/indexs.php

It's the SAME EXACT goddamn source code, it displays the SAME in Opera and FF no matter which page I choose...

BUT in stupid IE (6 OR 7) the first shows right, and the second doesn't....

I'm at my wits end, it just doesn't make ANY sense whatsoever. PHP is server-side, it serves the code all at once, so why the hell is IE caring if I include it or copy and paste it????

Has anyone else ever experienced this before?

14 answers to this question

Recommended Posts

  • 0

I know.

That's why i put the second example to clarify.....

anyway, i wasn't including the css file, i was including the code to include the css file...

but look at the second example. click the links. see.

the second example i included regular HTML code in indexs.php and in index.php i just wrote the exact same code without includes.

  • 0

IE.... that's the whole problem.

index and indexs serve the EXACT same code. But in IE, it trips up on indexs, but Opera and FF display it just right.... (it's not the name, either... it's the fact that i piece together the code with php includes in indexs, but in index it's all flat)

  • 0

just before you have "<div id="TABS">" in the second file, you have an un-printable character (at least to notepad anyway), this character isn't in the first file

Firefox, Opera, etc. are skipping over it, IE isn't.

Edit: HEX editor says its EF BB BF 09 (actually 4 bytes, displayed as one character)

  • 0

I don't see that file in my notepad.... or wordpad.

are you on windows?

It's really weird, because it happens with SHTML includes too - and didn't use to happen.

I can't locate that character in any of the editors I'm using (TopStyle, Expression, Dreamweaver, Notepad, WordPad).

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.