Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

lchown()

Example

Modify the ownership of a symbolic link by the user:

<?php
$target = “downloads.php”;
$link = “downloads”;
symlink($target, $link);

lchown($link, 8)
?>

Definition and Usage

A symbolic link’s owner can be modified by the user using the lchown() function.

Note: This is a filesystem link rather than an HTML link.

Note: Windows platforms are incompatible with this function.

Syntax

lchown(filegroup)

Parameter Values

Parameter

Description

file

Essential. specifies the symlink’s path.

group

Essential. Provides the name or number of the new user.

Technical Details

 

Return Value:

FALSE when it fails, TRUE when it succeeds

PHP Version:

5.1.3+