Home > Article > Backend Development > How to use php chown function
php The chown function is used to change the owner of the specified file. Its syntax is chown(file,owner). It returns TRUE if successful and FALSE if it fails.
#How to use the chown function in php?
Definition and usage
chown() function changes the owner of the specified file.
Returns TRUE if successful and FALSE if failed.
Syntax
chown(file,owner)
Parameters
file Required. Specifies the documents to be checked.
owner required. Provide new owner. Can be a username or the user's ID.
Example
<?php chown("test.txt","charles") ?>
The above is the detailed content of How to use php chown function. For more information, please follow other related articles on the PHP Chinese website!