Home Tutorial Php Phpfiles PHP chmod, PHP chmod Example


Share on Google+Share on Google+
PHP chmod, PHP chmod Example
Posted on: September 21, 2009 at 12:00 AM
The example of chmod() function in PHP. Learn how to use PHP chmod() in your PHP program.

In this section we will learn how to use the chmod() function in the PHP program. The chmod() function allows the developers to change the permission of the file. 


bool chmod(filename,mode types)

The chmod() function is used to change the read ,write, execute permission of  user, group, other. This command available for the unix/linux os. It is not supposed to work on the windows machine

The chmod() function returns true or false.

Mode has four numbers   for the user, group and other

It has first as 0 and other  three are sum of 1,2,4 i.e 1 or 2 or 3 or 4 or 5 or 6 or 7

1 -execute permission ,2 -write permission,3 -read permission









Related Tags for PHP chmod, PHP chmod Example:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 21, 2009

Recommend the tutorial

Advertisements Advertisements