CHAPTER 15Handling File Uploads

While most people tend to equate the Web with Web pages only, HTTP actually facilitates the transfer of any kind of file, such as Microsoft Office documents, PDFs, executables, MPEGs, zip files, and a wide range of other file types. Although FTP historically has been the standard means for uploading files to a server, such file transfers are becoming increasingly prevalent via a Web-based interface. In this chapter, you'll learn all about PHP's file-upload handling capabilities, in particular, the following:

  • PHP's file-upload configuration directives
  • PHP's $_FILES superglobal array, used to handle file-upload data
  • PHP's built-in file-upload functions: is_uploaded_file() and move_uploaded_file()
  • A review of possible ...

Get Beginning PHP and MySQL: From Novice to Professional, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.