Skip to main content

Using PHP to Manage Files

  • Chapter
  • First Online:
  • 1672 Accesses

Abstract

PHP has a huge range of functions designed to work with the server’s file system, but finding the right one for the job isn’t always easy. This chapter cuts through the tangle to show you some practical uses of these functions, such as reading and writing text files to store small amounts of information without a database. Loops play an important role in inspecting the contents of the file system, so you’ll also explore some of the Standard PHP Library (SPL) iterators that are designed to make loops more efficient.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 David Powers

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Powers, D. (2019). Using PHP to Manage Files. In: PHP 7 Solutions. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4338-1_7

Download citation

Publish with us

Policies and ethics