tags:

views:

79

answers:

5

hi

im trying to reach an image that is located in a folder outside my site. I tried to go outside my folder by putting ../ but this end with an error. I also tried to give an absolute path but there are spaces in there (like "documents and settings\") and this also doesnt work

does anybody have an idea?

+6  A: 
Paul Dixon
+3  A: 

Where is your image located? Generally, a website cannot access the full file system (for obvious reasons) of the computer serving it. You should either put the image in a folder under the root of your website or host it elsewhere.

Donnie DeBoer
hi my images folder is located at another site, where the users upload images, so i cant just take a photo and move it to my sites folders.i also need the users of that site to view their images.
+1  A: 

Stand HTML can't access files outside of the web root (for very good security reasons). Your best bet to achieve this would be to use a programming language to write some kind of handler that reads the file and then passes it to the output stream. For instance, in ASP.NET you could write an .ASHX handler.

Dan Diplo
A: 

In a URL, use the "+" character to mean spaces.

+1  A: 

You cannot reference resources outside your document root of your webserver. But you can define an alias for that folder:

Alias /images "C:/Users/Horst/Documents and Settings/My Images/"
Gumbo
+1 that's a good point, have amended my wordy answer to mention this too.
Paul Dixon