Viewers: in countries Watching now:
The basic process of uploading files with PHP is very simple, but there are security implications that many people are unaware of. This course shows how to create a secure custom PHP class that can handle both single-file and multi-file uploads. Author David Powers shows you how to create a file upload class that checks the size, type, and names of files, renaming them when it encounters a duplicate file name. He'll show you how to make the class report on the outcome of the upload process and the nature of any errors that occur, and how to prevent the user from uploading files that exceed the server limits.
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.
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.
There are currently no FAQs about Uploading Files Securely with PHP.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.