Managing Files
The final segment of this Web application will manage files of any type. These scripts will allow users to upload files from their computers, which will then be stored on the server. The concept behind managing file uploads—as well as the very, very important preparation steps—was discussed in Chapter 11, “Extended Topics.” This application will expand upon that basic demonstration by
Storing the file’s information in the database
Renaming the file
Providing a method of downloading the files
Placing the files outside of the Web root directory, for improved security
In order to use these scripts, you’ll need to do two things. First, create the uploads table (if you haven’t already), using this SQL command (Figure 12.21).
Figure 12.21. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access