ssh2_sftp_realpath
(PECL ssh2:0.10-0.9)
ssh2_sftp_realpath — Résout le chemin réel d'un chemin fourni
Description
string ssh2_sftp_realpath
( resource $sftp
, string $filename
)
Traduit un nom de fichier filename en son chemin réellement effectif sur le système de fichiers distant.
Valeurs de retour
Retourne le chemin réel, sous la forme d'une chaîne de caractères.
Exemples
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' */
?>
ssh2_sftp_realpath
There are no user contributed notes for this page.
