本文整理汇总了PHP中Net_SFTP::chown方法的典型用法代码示例。如果您正苦于以下问题:PHP Net_SFTP::chown方法的具体用法?PHP Net_SFTP::chown怎么用?PHP Net_SFTP::chown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Net_SFTP
的用法示例。
在下文中一共展示了Net_SFTP::chown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stream_metadata
/**
* This method is called to set metadata on the stream. It is called when one of the following functions is called on a stream URL:
* - touch()
* - chmod()
* - chown()
* - chgrp()
*
* Changes stream options
*
* @param String $path
* @param Integer $option
* @param mixed $var
* @return bool
* @access public
*/
public function stream_metadata($path, $option, $var)
{
$connection = $this->stream_open($path, NULL, NULL, $opened_path);
if ($connection === false) {
return FALSE;
}
switch ($option) {
case 1:
// PHP_STREAM_META_TOUCH
$touch = $this->sftp->touch($this->path, $var[1], $var[0]);
$this->stream_close();
return $touch;
case 2:
// PHP_STREAM_META_OWNER_NAME
$this->stream_close();
return FALSE;
case 3:
// PHP_STREAM_META_OWNER
$chown = $this->sftp->chown($this->path, $var);
$this->stream_close();
return $chown;
case 4:
// PHP_STREAM_META_GROUP_NAME
$this->stream_close();
return FALSE;
case 5:
// PHP_STREAM_META_GROUP
$chgrp = $this->sftp->chgrp($this->path, $var);
$this->stream_close();
return $chgrp;
case 6:
// PHP_STREAM_META_ACCESS
$chmod = $this->sftp->chmod($var, $this->path);
$this->stream_close();
return $chmod;
default:
$this->stream_close();
return FALSE;
}
}