How to view/read/or download the uploaded file in php.
I made a form and i create a folder for the uploaded file. I tested the form and yes all the file i uploading will directly go to /folder for uploaded files.
my only problem is, how can i view or download the file from /folder for uploaded files?
Help appreciated.
thanks a lot.
Download uploaded files in folder
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Download uploaded files in folder
User glob() or other filesystem functions to get a list of the file and then build a web page with links to those files. If the uploaded files are in the pubic directory then they can just be URLs. If the files are outside the public directory then create a script that sets the correct header and sends the file to the browser.
(#10850)