Handling 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 error messages returned from an upload script

  • An overview of the HTTP_Upload PEAR package


Class Note Multiple File File Property Client Machine Upload File 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© W. Jason Gilmore 2008

Personalised recommendations