View Full Version : image src problem when referencing folder above document root

07-14-2011, 01:58 PM
Not sure if this is strictly a HTML question but it seemed the most appropriate place to start the thread.

I have a file, example.php and I'm trying to display an image inside this file. The image is stored in a folder called uploads which is outside the document root for security purposes.

So to reference the file I try..

img src="../uploads/image.jpg"

this would strike me as the answer, and this works on WAMP. However it doesn't work on my webserver.

Been messing around with this for about an hour now, any reasons why this doesn't work? and how should I work around this?

Many thanks in advance, Chris

07-14-2011, 04:07 PM
You have a link to your live site?

It may be a permissions issue, or could be a filepath issue once the files are on the remote server.