ssh2_sftp_readlink

(PECL)

ssh2_sftp_readlink --  シンボリックリンクのターゲットを返す

説明

string ssh2_sftp_readlink ( resource sftp, string link )

シンボリックリンクのターゲットを返します。

例 1. シンボリックリンクを読み込む

<?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 は例えば次のような感じ: '/var/run/mysql.sock' */
?>

readlink(), ssh2_sftp_symlink() も参照ください。