Home  >  Article  >  Backend Development  >  How to use php chown function

How to use php chown function

藏色散人
藏色散人Original
2019-05-26 16:38:492781browse

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 php chown function

#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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn