Dutch PHP Conference 2025 - Call For Papers

lchgrp

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

lchgrpChanges group ownership of symlink

Опис

lchgrp(string $filename, string|int $group): bool

Attempts to change the group of the symlink filename to group.

Only the superuser may change the group of a symlink arbitrarily; other users may change the group of a symlink to any group of which that user is a member.

Параметри

filename

Path to the symlink.

group

The group specified by name or number.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Приклади

Приклад #1 Changing the group of a symbolic link

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

lchgrp($link, 8);
?>

Примітки

Зауваження: Ця функція незастосовна для роботи з віддаленими файлами, оскільки файл повинен бути доступним через файлову систему сервера.

Зауваження: Для Windows-платформ ця функція нереалізована.

Прогляньте також

add a note

User Contributed Notes

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