CakeFest 2024: The Official CakePHP Conference

ssh2_sftp_realpath

(PECL ssh2 >= 0.9.0)

ssh2_sftp_realpathBelirtilen dosya yolu dizgesinden gerçek yolu elde eder

Açıklama

ssh2_sftp_realpath(resource $sftp, string $yol): string

Belirtilen yoldizgesinden uzak sunucunun kök dizinine göre asıl yolu elde eder.

Bağımsız Değişkenler

sftp

ssh2_sftp() tarafından açılmış bir SSH2 SFTP özkaynağı.

yol

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

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top