Re: Opening files....

From: Date: Sun, 06 Mar 2005 19:26:18 +0000
Subject: Re: Opening files....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-210109@lists.php.net to get a copy of this message
> 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.

« previous php.general (#210109) next »