Using PHP with your file system

Jun 14, 2009 Author: LinuxAdmin

PHP can interact with your file system — the directories and files that are on
your local hard disk or on other computers accessible over a network. PHP can
write into a file on your file system, creating the file if it doesn’t exist, and can
read the contents from files.It can also create directories, copy files, rename
files, delete files, change file attributes, and perform many other file system
tasks. PHP allows you to perform almost any task related to your file system.
Many Web sites need to interact directly with the file system. For example,
a Web application may save information temporarily in a file rather than in a
database, or may need to read information from a file.
System administrative and maintenance scripts frequently need to interact
with the file system. For example, you may want to use a PHP script to back
up files, to clean out directories, or to process text files by reformatting their
contents. PHP can perform these tasks quite well.

views 3553
  1. Add New Comment