array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.ssh2-exec.php', 1 => 'ssh2_exec', ), 'up' => array ( 0 => 'ref.ssh2.php', 1 => 'SSH2 İşlevleri', ), 'prev' => array ( 0 => 'function.ssh2-disconnect.php', 1 => 'ssh2_disconnect', ), 'next' => array ( 0 => 'function.ssh2-fetch-stream.php', 1 => 'ssh2_fetch_stream', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/ssh2/functions/ssh2-exec.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ssh2 >= 0.9.0)
ssh2_exec — Uzak sunucu üzerinde bir komut çalıştırır
$oturum
,$komut
,$pty
= ?,$ortam
= ?,$genişlik
= 80,$yükseklik
= 25,$enboy_türü
= SSH2_TERM_UNIT_CHARSUzak sunucu üzerinde bir komut çalıştırır ve bunun için bir kanal ayırır.
oturum
ssh2_connect() ile sağlanan bir SSH bağlantı tanıtıcısı.
komut
pty
ortam
Hedef ortamda atanacak ortam değişkenlerini isim-değer çiftleri olarak içeren bir ilişkisel dizi.
genişlik
Sanal uçbirim genişliği.
yükseklik
Sanal uçbirim yüksekliği.
width_height_type
SSH2_TERM_UNIT_CHARS
veya
SSH2_TERM_UNIT_PIXELS
olabilir.
Başarısızlık durumunda false
, yoksa bir akım özkaynağı döndürür.
Örnek 1 - Karşıda bir komut çalıştırmak
<?php
$baglanti = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($baglanti, 'birey', 'parola');
$stream = ssh2_exec($baglanti, '/usr/local/bin/php -i');
?>