You are here: Re: [PHP] Opening files.... « PHP « IT news, forums, messages
Re: [PHP] Opening files....

Posted by Guillermo Rauch on 03/06/05 21:26

> Hello,
> I want to open files in a directory other than the Document root via
> HTTP on the client machine. How do i do it ?
Yes, it's possible

Just supose you have the images under /var/images/. This won't be
acceded by apache since it's out of documentroot.

You can set up some alias to /var/images

For example
alias /images/ /var/images/

The problem is, that most servers don't let users access
directories outside the DocumentRoot of the customers VirtualHost.

Also, if you can read that directory, you can create a path images in
your documentroot, and create a .htaccess file like this:

ErrorDocument 404 image.php

In image.php you catch the referrer with $_SERVER['http_referrer'] and
display the image sending the header img/jpeg

> Also, Is there a way that I can force the .JPG files to open in a
> particular software ?
No.

Best,
Guillermo Rauch.

 

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

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