From the course: PHP Techniques: Working with Files and Directories

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configuring PHP for file uploads

Configuring PHP for file uploads - PHP Tutorial

From the course: PHP Techniques: Working with Files and Directories

Start my 1-month free trial

Configuring PHP for file uploads

- [Instructor] In this chapter, we're going to learn how to work with user uploaded files. In the previous chapters, we worked with files and directories that already existed on the web server. PHP can also allow users to upload files via a web form. Those users could be the general public but can also be site administrators who are working inside a content management system. They might be uploading images, PDFs, calendars or other documents. Let's start by seeing how PHP is configured to allow file uploads. The PHP settings related to file uploads are in the PHP dot INI file. That's the configuration file PHP reads when it first starts up. There are several settings to take note of the default settings are probably correct but it's good to know what to look for if they're not. The most important is file uploads. This determines whether any uploads are allowed at all. So of course you want it to be set to…

Contents