lchown

(PHP 5 >= 5.1.2)

lchownChanges user ownership of symlink

說明

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.

參數

filename

Path to the file.

user

User name or number.

回傳值

如果成功則回傳 TRUE,失敗則回傳 FALSE

範例

Example #1 Changing the owner of a symbolic link

<?php
$target 
'output.php';
$link 'output.html';
symlink($target$link);

lchown($link8);
?>

註釋

Note: 本函式不能作用於遠端檔案,被檢查的檔案必須可經由伺服器的檔案系統存取。

Note: 安全模式被啟用時,PHP 將檢查被操作的檔案或者目錄是否與正在執行的腳本有相同的 UID(擁有者)。

Note: 本函式未在 Windows 平台下實作。

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top