downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ssh2_sftp_rename> <ssh2_sftp_readlink
[edit] Last updated: Fri, 25 May 2012

view this page in

ssh2_sftp_realpath

(PECL ssh2 >= 0.9.0)

ssh2_sftp_realpath指定されたパス文字列の実パスを解決する

説明

string ssh2_sftp_realpath ( resource $sftp , string $filename )

filename をリモートファイルシステム上の有効な実パスに変換します。

パラメータ

sftp

ssh2_sftp() でオープンした SSH2 SFTP リソース。

filename

返り値

実際のパスを表す文字列を返します。

例1 パス名の解決

<?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 は次の通り: '/etc/passwd' */
?>

参考



add a note add a note User Contributed Notes ssh2_sftp_realpath
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites