How to create a file download management system-php Tutorial

Source: Internet
Author: User
I want to create a file download management system and want to ask the specific idea. can I add a file name to the table for statistics during each Upload? this is my idea. I am a newbie, I hope you can give me some advice on Cainiao. don't use a framework. thank you. ------ solution ------------------ you can create a new file table to manage the ID in the file: the ID of the automatically numbered file, the file name, and the upload time, upload users .. During Upload, I usually name each uploaded file and want to create a file download management system.
I would like to ask if I can manage the problem of adding file names to the table for statistics during each Upload. this is my idea. I am a newbie. I hope you can give me some advice on Cainiao instead of framework, thank you.

------ Solution --------------------
You can create a file table to manage files.
There are
ID: automatic ID
File number, file name, upload time, upload user, etc ..
During Upload, I usually name each uploaded file as an ID and add the "file extension" field to the file table.
This ensures that files are not repeated during upload.
A specific directory is used to store files. for example, you can create a file folder in the www root directory to store all uploaded files.
If you want to list all files
SELECT * FROM file
Download ID number name
1 001 this is an uploaded file.
When you click download, you only need to get the ID and extension of this record to get the file.
If the extension name of this file is .jpg, the file is located in/file/1.jpg.
------ Solution --------------------
Discussion
Dear valued customer, this is also my idea. thank you very much. to do this, click download to bring up a password box. if the verification succeeds, you can download it. Do you know how to do this? Thank you for your answers ..

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.