What is chmode in PHP Filesystem
In this article I am going to explain about chmode function in PHP.
PHP chmod() function
The filesystem chmode function is used to changes file mode of the specified file to that given in mode.
Syntax of chmod function
Parameters in chmode function
It have two parameter:
Parameter |
Description |
file |
Path to the file. |
mode |
It specifies a new permission. |
Example of filesystem chmode function
<html>
<body>
<?php
// Read and write for owner, nothing for everybody else
chmod("C:\wamp\www\Dinesh\Mcn.txt", 0600);
// Read and write for owner, read for everybody else
chmod("C:\wamp\www\Dinesh\Mcn.txt", 0644);
// Everything for owner, read and execute for others
chmod("C:\wamp\www\Dinesh\Mcn.txt", 0755);
// Everything for owner, read and execute for owner's group
chmod("C:\wamp\www\Dinesh\Mcn.txt", 0750);
?>
</body>
</html>
|
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here