PHP 8.3.4 Released!

lchown

(PHP 5 >= 5.1.3, PHP 7, PHP 8)

lchownChanges user ownership of symlink

Descrizione

lchown(string $filename, string|int $user): bool

Attempts to change the owner of the symlink filename to user user.

Only the superuser may change the owner of a symlink.

Elenco dei parametri

filename

Path to the file.

user

User name or number.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Esempi

Example #1 Changing the owner of a symbolic link

<?php
$target
= 'output.php';
$link = 'output.html';
symlink($target, $link);

lchown($link, 8);
?>

Note

Nota: Questa funzione non opererà su file remoti perché il file che deve essere esaminato deve essere accessibile attraverso il filesysmte del server.

Nota: Questa funzione non è implementata sulle piattaforme Windows.

Vedere anche:

  • chown() - Cambia il proprietario del file
  • lchgrp() - Changes group ownership of symlink
  • chgrp() - Cambia il gruppo del file
  • chmod() - Cambia le impostazioni del file

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top