Hi,
So Sorry for taking so much time to reply.
$_SERVER['DOCUMENT_ROOT'] gives me this
/home/users/web/b562/whl.aunn2008/project1/www/
So as the FTP client displays the folder structure the image should be placed in /home/users/web/b562/whl.aunn2008/project1/resources/additional/image.jpg
Still ../resources/additional/image.jpg does not displays the image :( :( :(
Niranga
OK, by what you've said, the webserver is serving pages from your site out of this folder:
/home/users/web/b562/whl.aunn2008/project1/www/
So, anything OUTSIDE that folder will not be visible to your web browser. It sounds like you want to move the resources folder into this www directory, so the full path to the image will be:
/home/users/web/b562/whl.aunn2008/project1/www/resources/additional/image.jpg
And for your web browser the path would be: http://sitename.com/resources/additional/image.jpg
If you want to keep the images in this other folder, you'll need to use server side scripting of some kind to include the image in your page.
-----------------------------------------------
After reading the rest of the thread, I see that you can't move the images. So, there's probably some function that is serving the images already that you can use, or write your own, something like this:
In a file called "image.php":
<?php
$file = basename(urldecode($_GET['file']));
$fileDir = '/home/users/web/b562/whl.aunn2008/project1/resources/additional/';
if (file_exists($fileDir . $file))
{
// Note: You should probably do some more checks
// on the filetype, size, etc.
$contents = file_get_contents($fileDir . $file);
// Note: You should probably implement some kind
// of check on filetype
header('Content-type: image/jpeg');
echo $contents;
}
?>
In the index.php file:
<img src="image.php?image.jpg">