Re: Download File Routine

From: Date: Wed, 22 Nov 2000 17:33:58 +0000
Subject: Re: Download File Routine
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26674@lists.php.net to get a copy of this message
Michael, > Well I can think of a solution. Call your script like > www.yoursite.com/script/path/to/file/filename > > where script is the name of your php script and make sure that /path/to/file > is outside your web tree. > Then in your PHP script you can parse $PATH_INFO (which in this case will be > something like /path/to/file/filename) and fetch and send the file to the > user. This way the user can only get the file while going through your > script. > Can you please provide some sample code. I'm relatively new to PHP. Thanks, George

« previous php.general (#26674) next »