ssh2_sftp_realpath
(PECL)
ssh2_sftp_realpath --
Résoud le chemin réel d'un chemin fourni
Description
string
ssh2_sftp_realpath ( resource sftp, string filename )
ssh2_sftp_realpath() traduit un nom de fichier
filename
en son chemin réellement effectif sur
le système de fichiers distant.
Exemple 1. Résoudre un nom de chemin
<?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 est maintenant : '/etc/passwd' */ ?>
|
|
Voir aussi
realpath(),
ssh2_sftp_symlink() et
ssh2_sftp_readlink().