O'Reilly logo

PHP Solutions: Dynamic Web Design Made Easy by David Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7 USING PHP TO MANAGE FILES

What this chapter covers:

  • Reading and writing files
  • Listing the contents of a folder
  • Automatically naming the next file in a series
  • Opening remote data sources
  • Creating a download link

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. I'll also show you how to create a drop-down menu that lists all images in a folder, automatically name the next file in a series, and prompt a visitor to download an image or PDF file rather than open it in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required