• PHP Video Tutorials

PHP - Function lchown()



The lchown() function can change user ownership of symlink. It can return true on success or false on failure.

Syntax

bool lchown ( string $filename , mixed $user )

The lchown() function can attempt to change the owner of a symlink filename to the user, and only the superuser may change the owner of a symlink.

Example

<?php
   $target = "/PhpProject/PhpTest.php";
   $link = "/PhpProject/test.html";
   symlink($target, $link);

   lchown($link, 8);
?>
php_function_reference.htm
Advertisements