Join David Powers for an in-depth discussion in this video Overview of the UploadFile class, part of PHP: Uploading Files Securely.
…Whether you've been building your own…version of the UploadFile class definition.…Or you've jumped straight to this chapter, let's take a…look at the classes features and how to use it.…The primary emphasis is on security when uploading files.…The class limits the size of individual file uploads.…Although the size can be changed, the class prevents…you from exceeding the limits set in the server's configuration.…Uploads can be restricted to a predefined range of MIME type.…
Alternatively, the class will automatically append a suffix to the…names of files such as executables, that are considered risky.…The upload file class has also been designed to be flexible.…It automatically handles both single, and multiple file uploads.…Most default settings can be changed without editing the class definition.…These are the defaults in the version of the class in the exercise files.…The maximum size for an individual file is 50 kilobytes.…
Uploads are restricted to image formats commonly used on the web.…But if uploads of all types are enabled, .upload is automatically…
At the end of this course, you'll have a robust, flexible class that can be incorporated into many projects (including web forms) with just a few lines of code.
- How PHP handles file uploads
- Setting the maximum file size
- Moving the file to its destination
- Creating and using a namespaced class
- Displaying error messages
- Restricting unacceptable MIME types and file extensions
- Using the class
- Reporting errors
- Altering the user
Skill Level Intermediate
1. File-Upload Basics
2. Creating a File-Upload Class
Checking the error level5m 7s
3. Making the Class More Secure
4. Handling Multiple File Uploads
5. Using the Class
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.