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 ...
Get PHP Solutions: Dynamic Web Design Made Easy 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.