Copyright © tutorialspoint.com
| bool chown ( string $filename, mixed $user ); |
Attempts to change the owner of the file filename to user user. Only the superuser may change the owner of a file.
| Parameter | Description |
|---|---|
| path | A path to the file. |
| user | A user name or number. |
Returns TRUE on success or FALSE on failure.
Following is the usage of this function:
<?php $path = "/home/httpd/html/index.php"; $user_name = "root"; chown($path, $user_name); ?> |
Copyright © tutorialspoint.com