ssh2_sftp_realpath
(PECL ssh2 >= 0.9.0)
ssh2_sftp_realpath — Belirtilen dosya yolu dizgesinden gerçek yolu elde eder
Açıklama
string ssh2_sftp_realpath
( resource
$sftp
, string $yol
)
Belirtilen yoldizgesinden uzak sunucunun kök
dizinine göre asıl yolu elde eder.
Dönen Değerler
Asıl yolu bir dizge olarak döndürür.
Örnekler
Örnek 1 - Bir dosya yolunun çözümlenmesi
<?php
$baglanti = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($baglanti, 'birey', 'parola');
$sftp = ssh2_sftp($baglanti);
$asilyol = ssh2_sftp_realpath($sftp, '/home/birey/../../../..//./usr/../etc/passwd');
/* $asilyol: '/etc/passwd' */
?>
Ayrıca Bakınız
- realpath() - Normalleştirilmiş mutlak dosya yolunu döndürür
- ssh2_sftp_symlink() - Karşıda bir sembolik bağ oluşturur
- ssh2_sftp_readlink() - Bir sembolik bağın hedefini döndürür
There are no user contributed notes for this page.
