ssh2_sftp_readlink
(PECL ssh2 >= 0.9.0)
ssh2_sftp_readlink — Return the target of a symbolic link
说明
Returns the target of a symbolic link.
返回值
Returns the target of the symbolic link 或者在失败时返回 false.
示例
示例 #1 Reading a symbolic link
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
$target = ssh2_sftp_readlink($sftp, '/tmp/mysql.sock');
/* $target is now (e.g.): '/var/run/mysql.sock' */
?>参见
- readlink() - 返回符号连接指向的目标
- ssh2_sftp_symlink() - Create a symlink
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
