Menu Home

lchown

osbo.com | PHP | Functions | lchown

Changes user ownership of symlink

Syntax

lchown ( string $filename , mixed $user ) : bool

Parameters

filename

Path to the file.

user

User name or number.

Return

Returns TRUE on success or FALSE on failure.

Examples

<?

$target = 'output.php';
$link = 'output.html';
symlink($target, $link);
printf("%d\n", fileowner($target));

lchown($link, 8);
printf("%d", fileowner($target));

unlink($link);

?>
0
8

PHP