Re: Opening files....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux