Handling File Uploads

Abstract

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

Keywords

Nism 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© W. Jason Gilmore 2008

Personalised recommendations