Hi,
Simon Fredriksson wrote:

I'm writing a file-download system. In order to download, the user will have to login with username and password. Now, how do I feed the file to the user if it's not under htdocs? Or should the files be under htdocs (in subdirs of course) and have some .htaccess limitations?

This topic is often discusses in this board and you will find tons of solutions in the archives. In short all you need to do is open the file, read it's contents and write it to the output stream - of course you will need to send the correct headers first.



There is a chance that some files can be several gigs big. Will this be a problem?

no.


//Simon



--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

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



Reply via email to