(PHP 5 >= 5.1.2)
lchown — Changes user ownership of symlink
說(shuō)明
bool lchown ( string$filename
, mixed $user
)
Attempts to change the owner of the symlink filename
to user user
.
Only the superuser may change the owner of a symlink.
參數(shù)
filename
Path to the file.
user
User name or number.
返回值
成功時(shí)返回 TRUE
, 或者在失敗時(shí)返回 FALSE
。
范例
Example #1 Changing the owner of a symbolic link
<?php
$target = 'output.php';
$link = 'output.html';
symlink($target, $link);
lchown($link, 8);
?>
注釋
Note: 此函數(shù)不能作用于遠(yuǎn)程文件,被檢查的文件必須是可通過(guò)服務(wù)器的文件系統(tǒng)訪問(wèn)的。
Note: 當(dāng)啟用 安全模式時(shí), PHP 會(huì)檢查被操作的文件或目錄是否與被執(zhí)行的腳本有相同的 UID(所有者)。
Note: 此函數(shù)未在 Windows 平臺(tái)下實(shí)現(xiàn)。
參見(jiàn)
chown() - 改變文件的所有者 lchgrp() - Changes group ownership of symlink chgrp() - 改變文件所屬的組 chmod() - 改變文件模式