Working with Files in PHP
In this tutorial, we look at using files in PHP. In the first part of this article, we are going to look at how to get a directory listing of all the files and directories at a specified path on your web server.
We then move on to looking at how to write text files on the server, in csv format so they can easily be used in the many applications that can read csv (Comma Seperated Value) files, and how to dump the contents of a Dreamweaver MX recordset to a csv file.
Next we look at reading back existing csv files, and storing the data in an array so that it's easy to work with it. Finally we close the article by looking at some other file related commands, such as using unlink() to delete a file.
Read More