Introduction
This tutorial will concentrate on the basic methods used to handle files in PHP. There are multiple functions available in PHP for these types of operation, but we will only be concentrating on some of the more important functions that PHP provides for file handling. This should leave you with enough insight to continue on your own.
This tutorial assumes several things about the reader:
* You are familiar with PHP
* You have access to a server or servers running the PHP package
* You have read/write privileges to the root folder on your server
The easiest way to provide yourself with read/write privileges to a file and/or folder on your server is to open an ftp session to your active directory and use the CHMOD command to grant full permissions to the target file/folder. If this option is not open to you, you can also use the chmod() function in PHP:
bool chmod (string filename, int mode)
This function will return a boolean true or false, where true is success and false is a change of permissions failure. For our example, you will require the permissions of the root folder on your server to be set to 777.
Once you have completed this tutorial, I would urge you to consult the PHP manual to experiment further with privileges and functions regarding file handling.
Tuesday, April 17, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment