(PECL ssh2 >= 0.9.0)
ssh2_sftp_realpath — Resuelve la ruta real de una ruta proporcionada
Traduce un nombre de fichero filename
en su ruta
realmente efectiva en el sistema de ficheros remoto.
Devuelve la ruta real, en forma de string.
Ejemplo #1 Resolver un nombre de ruta
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
$realpath = ssh2_sftp_realpath($sftp, '/home/username/../../../..//./usr/../etc/passwd');
/* $realpath es ahora: '/etc/passwd' */
?>