array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.lchown.php', 1 => 'lchown', ), 'up' => array ( 0 => 'ref.filesystem.php', 1 => '文件系统函数', ), 'prev' => array ( 0 => 'function.lchgrp.php', 1 => 'lchgrp', ), 'next' => array ( 0 => 'function.link.php', 1 => 'link', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/filesystem/functions/lchown.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.1.3, PHP 7, PHP 8)
lchown — 修改符号链接的所有者
尝试修改符号链接 filename
的 所有者 user
只有超级用户任意修改符号链接的所有者。
filename
文件路径。
user
所有者名称或编号
示例 #1 Changing the owner of a symbolic link
<?php
$target = 'output.php';
$link = 'output.html';
symlink($target, $link);
lchown($link, 8);
?>