lchown() function in PHP

PHPz
Release: 2023-09-04 11:18:01
forward
972 people have browsed it

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)
Copy after login

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);
?>
Copy after login

Output

TRUE
Copy after login

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

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!