更新时间:2023-12-04 20:31:22
只需上传文件就需要使用PHP。
但是为了维护关于文件的信息,你需要MySQL。
例如,对于一个学生,学生ID 1和他或她上传ProjectFile.pdf
然后你需要上传一个文件在一个独特的位置(替代你可以重命名文件)与数据库中的以下信息
1.学生ID:1
2.文件路径:../Assets / Upload /< ;一些随机字符串> /ProjectFile.pdf
3.文件名:ProjectFile.pdf
现在从MySQL下载扫描文件标签les。
获取最终用户的文件路径和开始下载文件。
我希望我能够解析您的查询。
For uploading file only you need to use PHP.
But for maintaining information regarding file u need MySQL.
For example for one student the Student Id 1 and he or she uploading a ProjectFile.pdf
then you need to upload a file in a unique location (alternative you can rename file) with following information in database
1. StudentID : 1
2. FilePath : ../Assets/Upload/<Some Random String>/ProjectFile.pdf
3. FileName : ProjectFile.pdf
Now at the time of download scan file from MySQL Tables.
Get the File Path and Start Download file for End User.
I hope i am able to resolve your query.
在此处查看答案:文件上传和下载Php [ ^ ]
这里:使用PHP上传文件到MySQL数据库 - PHP [ ^ ]
See answer here: File upload and Download in Php[^]
And here: Uploading files into a MySQL database using PHP - PHP[^]