Forum Moderators: coopster
*** WWW FOLDER ***
index.php
images folder
articles folder
------------------------
*** articles folder ***
aboutme.php
^^^^ this include an include to index.php and i use the following code.
<?php include "../index.php"?>
but when index is displayed it does not show the images!
Any easy work arounds please
i dont want to have to have every image as
<img src="www.example.com/images/header.gif"
This way you can avoid typing the whole URL.
Habtom
yes habtop your right there with the images folder being called from different folders
What did work was <img src="../images/header.gif">
but then when i go back to index.php the images do not show.
as they would be linked from header.php as ../
so just to clear up in the header file in the root folder i want to link to images folder.
but from index.php ../ will not exist sorry if thats slightly confusing
but is this good practice? i dont want to reveal to much to people looking at my source code on the internet.
Also when it comes to uploading, hundreds of links will need changing although i should be able to use my software to REPLACE "" with ""
using the absolute path from the web root should work fine
/images/imagename.gif
this means the images folder is located in the webroot and can be referenced as such from anywhere within the site.
you can test this path by pasting it into the location bar and adding just the domain in fromt, like so
www.example.com/images/imagename.gif
if the above doesn't work then you have the wrong path.
when you use ../ and you include that file from various places on your site it will not work as the path changes depending on where it is included from.