![]() |
|
#1
|
|||
|
|||
|
Hi,
I'm building a website and it was wrking fine, until i added a new page and changed some paths - like ../../css/styles.css to http://www.blah.com/css/styles.css. It uses includes to include the header.php file and the footer.php file on each page. This error occurs in the header. All the paths and urls seem correct, but when i view my page online, this: [html]<table class="maintable" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="header" style="width: 516px"> <img src="http://www.blah.com/home/images/banner.jpg" class="banner" alt="Bleh" /></td> <td class="header"> <img src="http://www.blah.com/home/images/bannerend.jpg" width="44" height="170" alt="End" align="right" /></td> </tr> </table> [/html]turns into this in the source: [html]<table class="maintable" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="header" style="width: 516px"> <!-- --></td> <td class="header"> <!-- --></td> </tr> </table>[/html] Anyone know what's going on? Thanks. Also, I can post up any other bits of the code if anyone needs to see it to find the problem. |
|
#2
|
||||||||||||
|
||||||||||||
|
It seems to be ignoring out the line including the images.
Could be something to do with the full URLs. Do you get the same problem when they are relative?
__________________
__________________
serverguy My System: Eclipse
|
|
#3
|
|||
|
|||
|
I've just tried it on a college computer using IE and it works. I'm just going to check it at home later on and see if it works there too. God knows what happened there...
|
|
#4
|
||||||||||||
|
||||||||||||
|
I've never seen anyone use an http address to point to a style sheet - it's meant to be a file on a directory on a server's local drive. Have you a reason for doing it? Are you sure it's valid? I'd be very surprised if it were. I'm quite sure it means that there's no way of relative addressing any other directory from it which is what you're trying to do.
__________________
My System: Tim
|
|
#5
|
|||
|
|||
|
Or maybe not. That was my first reaction but it may well be wrong and I'm just used to how I've done things. It's still an odd decision in my opinion.
|
|
#6
|
|||
|
|||
|
Quote:
Just like you can with a image or anything else you want to include.
__________________
serverguy |
|
#7
|
|||
|
|||
|
So how on earth does it pick up the includes? Surely includes have to be, relative or absolute, on the same networked drive system as the php engine.
|
|
#8
|
|||
|
|||
|
what i don't understand is how it works fine on computers at my college but not at home (in both firefox and ie). Suggests to me that it must be something to do with my computer. But i just cant figure out what.
|
|
#9
|
|||
|
|||
|
Go on, there's lots of differences. IIS or Apache, linux or MS, even just the pathnames to the www htdocs folder. I'm not sure we can just guess, debugging this involves looking at the raw code you're storing. If we had the entire header include file, for example, we could at least check it's syntax-clean.
How about the include_path in php.ini is different? |
|
#10
|
|||
|
|||
|
Hang on, that's me maybe misreading things again. So you mean you're getting the difference when it's on two differently-located servers, or when it's on two differently-located browsers? I'd assumed two different servers but that's possibly mistaken. There are so many ways of interpreting what you've said so far.
|