略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: lchown

2024-05-08

lchown

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

lchown修改符号链接的所有者

说明

lchown(string $filename, mixed $user): bool

尝试修改符号链接 filename 的 所有者 user

只有超级用户任意修改符号链接的所有者。

参数

filename

文件路径。

user

所有者名称或编号

返回值

成功时返回 true, 或者在失败时返回 false

范例

示例 #1 Changing the owner of a symbolic link

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

lchown($link8);
?>

注释

注意: 此函数不能作用于远程文件,被检查的文件必须是可通过服务器的文件系统访问的。

注意: 此函数未在 Windows 平台下实现。

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.lchown.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3