![]() |
| |||||||
| |
![]() |
| | Thread Tools |
|
#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 Code: <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 Code: <table class="maintable" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="header" style="width: 516px"> <!-- --></td> <td class="header"> <!-- --></td> </tr> </table> Also, I can post up any other bits of the code if anyone needs to see it to find the problem. Last edited by Keys767 : 11-03-2008 at 05:48 PM. |
| |
|
#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 |
|
#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
Want your system info in your signature? |
|
#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.
__________________
My System: Tim
Want your system info in your signature? |
|
#6
| ||||
| ||||
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.
__________________
My System: Tim
Want your system info in your signature? Last edited by spot : 12-03-2008 at 10:05 PM. |
|
#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? My System: Tim
Want your system info in your signature? |
|
#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.
__________________
My System: Tim
Want your system info in your signature? |
|
#11
| ||||
| ||||
| Spot I am afraid I have no idea what you are on about TBH. Including the style sheet is basic HTML, the PHP engine has nothing to do with including it. If the page is built on the server using PHP includes or not then web browser will see nothing different. It will only get a plain page with whatever you got the PHP to build. The style sheet can be located anywhere. The browser will read the request for the style sheet when it renders the page and then follow that link, whether it is on the same directory or not, and get whatever styles it needs from it. It is the same as with images, it can be located anywhere. If you are talking about the PHP includes then they should be on the same server but can also be configured to be on a different server. In this case I think they are on the same server anyway. For proof of concept, click here and look at where the CSS is coming from. It works in IE7 and 8 and Firefox at least. As for the problem, considering one of the computers can see the page fine then it suggests that the actual server is serving up the pages fine. It is probably the way that the browser is interpreting the code. Have you tried it on different browsers? It may be worth changing the style sheet back to a relative reference on the server and see what happens then. The other thing that sometimes I have found to work is hitting refresh on the page.
__________________ serverguy Last edited by serverguy : 13-03-2008 at 05:40 PM. |
|
#12
| ||||
| ||||
| Could you post a copy of the actual PHP that generates this page? That might help in identifying the problem.
__________________ serverguy |
|
#13
| ||||||||||||
| ||||||||||||
| The reason it made no sense to you is that I was interpreting him as saying he'd hosted the pages on different computers, not that he'd browsed them from different computers. Hence the confusion.
__________________
My System: Tim
Want your system info in your signature? |
|
#14
| ||||
| ||||
| Yeah, I meant viewing them fromt different computers. It works when view on both FF and IE in college (XP Pro), but on neither FF nor IE at home (Vista Premium). Must be something to do with my computer. I just need to figure out what. Cleared everything, cache etc. checked settings. dunno whats wrong. I'll post the actual php coding as soon as i can. thanks. |
|
#15
| ||||||||||||
| ||||||||||||
| You don't suppose there's an ad-blocker somewhere between you and the server that's stripping out the graphics thinking they're advertising?
__________________
My System: Tim
Want your system info in your signature? |
|
![]() |
| Thread Tools | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with bad code :( | Breaker3D | Web Design & Programming | 8 | 08-04-2008 08:21 AM |
| Code 10 | lynne9999 | Sound, Speakers & MP3 Players | 7 | 31-01-2008 04:07 AM |
| WEP Code. | ComputerGuy | Networking, Modems & VoIP | 4 | 20-01-2008 10:59 PM |
| Best free website for hosting a website? | mxmad32 | Web Design & Programming | 9 | 10-01-2008 05:58 PM |
| Code problem, or something else! | pidge | Multimedia, Drivers & Codecs | 1 | 16-10-2007 05:18 PM |
| Powered by vBulletin® Copyright ©2000 - 2008 Jelsoft Enterprises Ltd. SEO by vBSEO ©2008, Crawlability, Inc. |