You are here: Re: Images in higher level directory « HTML « IT news, forums, messages
Re: Images in higher level directory

Posted by Harlan Messinger on 10/16/06 15:50

Iain wrote:
> Hi All
>
> I want to store various objects at a level higher than wwwroot.
>
> Is this possible
> I have the following test html program
>
> <html>
> <head>
> </head>
> <body>
> <img src = "..//Images//testimage.jpg" width = "300" height =
> "300"/>

What are the double slashes for?

> </body>
> </html>
>
> and the image is not displayed although the proerties of the image
> appear to be correct

Thank goodness. If URLs with ".." gave clients access higher than the
web root, clients would be able to access any file on the same drive
(unless access permissions were set with the greatest care, but that's
an immense burden and concern).

What you're supposed to do if you want a web site to include files in a
directory not under the web root is to create a virtual directory under
the web site in IIS (you mention wwwroot, so I assume you're talking
about IIS) that points to that physical directory so that, for example,

http://mysite.example.invalid/images/

points to your directory c:\mywebimages. Then

<img src="/images/x.gif">

will deliver c:\mywebimages\x.gif.

> ie they point to the correct directory

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация