March 11th, 2000, 12:38 AM
I am creating an intranet-type file management system where two or three users can upload and download Word files.
I know how to allow for file upload using HTML forms, but is there a way to allow download??
I'd appreciate if someone could help me out -- I can't seem to find any sample code to help me out.
March 11th, 2000, 05:45 AM
Basic downloading is accomplished by just linking to the file. As long as the extension isn't one that would normally open in a browser (e.g. .gif, .jpg). That said, .doc files will download normally under netscape and earlier version of IE. Later version of IE will open .doc types in the browser. That makes things a bit more complicated. You'll have to send headers setting the name of the file and the content-type (application/octet-stream) to force a download. Then read the file and pass it to the user.
Go to www.phpbuilder.com and do a search for "download" in the support forum, this has been discussed numerous times there.
Hi rod k,
I have a <a href><?php .... ?></a> in a php file. what this php code does is read a file(.exe) and send it over to the client. I am having problem downloading the file when i click on this link. It just send me text dump on my browser. I try to use the header(...), but it complains that header could not be sent again. How can i send the header over to the client again? I have to create the download link this way in order to hide the actual path of the file from the client. Do u have a better suggestion? Thanx in advance!