How to implement the php file download function, beginner
Source: Internet
Author: User
How to implement the php file download function! How do I write php file downloads? I did this for the first time, so I don't know how to do it. on the php page, upload a file & lt;/th & gt; & lt; td & gt; & lt; inputtype = & quot; file & quot; class = & quot; file & quo php: how to implement the file download function!
How do I write php file downloads? I did this for the first time, so I don't know how to do it. on the php page
Upload files
Then, use the move_uploaded_file method to put the file in the project's upload folder ($ path = '/upload/documents/'. time ();)
Enter several text boxes on the php page, and upload a file with a Browse button next to the text button, and click save on the page, the uploaded files will be saved to the above project upload folder.
However, I want to click the browse button and select a file. the file is displayed symbolic on the page, just like uploading files in many mailboxes, and then click the save button on the page, upload it to that folder. I won't
The above is the page for adding content, but how can I display and download the uploaded file when I edit this page? Because there is only one text button and the browse button next to it on the editing page.
That is, the download function does not know how to proceed. How can I download it? I checked the link on the Internet and said it was the path of the file by directly clicking the link (where the link is written and how to write it.
------ Solution --------------------
$ _ FILES: Get the Upload file name. The header function is used for downloading. However, no output is available before the header. generally, downloading is a separate page.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.