PHP chown()関数
❮PHPファイルシステムリファレンス例
「test.txt」ファイルの所有者を変更します。
<?php
chown("test.txt","charles")
?>
定義と使用法
chown()関数は、指定されたファイルの所有者を変更します。
構文
chown(file, owner)
パラメータ値
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to change owner for |
owner | Required. Specifies the new owner. Can be a user name or a user ID. |
技術的な詳細
戻り値: | 成功した場合はTRUE、失敗した場合はFALSE |
---|---|
PHPバージョン: | 4.0以降 |
❮PHPファイルシステムリファレンス