Join David Powers for an in-depth discussion in this video What you should know before watching this course, part of Uploading Files Securely with PHP.
- View Offline
To get the most out of this course you need a basic knowledge of PHP. By that I mean you should be familiar with frequently used PHP functions such as isset, isarray, inarray, and stringreplace. You should also have some experience of creating a custom function. If you're not familiar with a particular function you should know how to look it up in the PHP online documentation. You'll also need knowledge of control structures such as conditional statements, loops, and switch statements.
However you don't need any previous experience of PHP classes and objects. Although this course doesn't go into the details of object-oriented programming, it does explain the basics of defining a class and using it. In fact, you might find this course a practical introduction to building classes. If you're new to PHP or feel you need a refresher I recommend you take a look at my introducing PHP course here on lynda.com. Alternatively, you might prefer my PHP for web designers.
Both courses will give you a thorough grounding in the basics that you need to know. As for your development environment, you need a PHP-enabled web server, it doesn't matter whether you're working with a local testing environment or a remote server. Although you'll probably find it easier to test locally. With the exception of one video, I'll be working on Windows 7. But it doesn't matter which operating system you're on. However the version of PHP must be 5.3 or later.
The code won't run on earlier versions of PHP. Finally, you'll need a script editor. I'll be using Zen Studio 10.5, which is a commercial, dedicated IDE for PHP. But it doesn't matter which editor you use. We'll be focusing on the PHP code, not the features of a specific IDE.
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