Home >Backend Development >PHP Tutorial >lchown() function in PHP

lchown() function in PHP

PHPz
PHPzforward
2023-09-04 11:17:061071browse

lchown() function in PHP

The lchown function changes the user ownership of a symbolic link. The function returns TRUE on success and FALSE on failure.

Note - This function is not implemented on the Windows platform.

Syntax

lchown(file_path, user)

Parameters

  • file_path - Specifies the file path. Required.

  • User - Specify the username or number.

Return

lchown() function returns TRUE on success and FALSE on failure.

Example

<?php
   $target = new.php&#39;;
   $mylink = new.html&#39;;
   symlink($target, $mylink);
   lchown($mylink, 8);
?>

Output

TRUE

The above is the detailed content of lchown() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete