Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

ftp_exec

(PHP 4 >= 4.0.3, PHP 5)

ftp_exec -- Fordert die Ausführung eines Programmes auf dem FTP-Server an

Beschreibung

bool ftp_exec ( resource ftp_stream, string command)

Sendet ein SITE EXEC Kommando (command) an den FTP-Server. Gibt TRUE zurück, wenn das Kommando erfolgreich ausgeführt wurde (der Server antwortete mit code: 200). Sonst wird FALSE zurückgegeben.

Beispiel 1. ftp_exec() Beispiel

<?php

$kommando
= 'ls -al';

$conn_id = ftp_connect($ftp_server);

$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

if (
$res = ftp_exec($conn_id, $kommando)) {
    echo
$kommando . " wurde erfolgreich ausgeführt<br />\n";
    echo
nl2br($res);
} else {
    echo
"Konnte " . $kommando . " nicht ausführen";
}
?>

Siehe auch: ftp_raw()

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "PHP Handbuch". See Index Page for more info about Authorship and Copyright.

1999-2009 Linuxinfor.com. No rights reserved.