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

 
 

 

ftp_exec

(PHP 4 >= 4.0.3, PHP 5)

ftp_exec -- Richiede l'esecuzione di un programma sul server FTP

Descrizione

bool ftp_exec ( resource ftp_stream, string command)

Invia una richiesta SITE EXEC command al server FTP. Restituisce TRUE se il comando viene eseguito correttamente (codice di risposta: 200 da parte del server); altrimenti restituisce FALSE.

Esempio 1. Esempio di funzione ftp_exec()

<?php

$command
= '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, $command)) {
    echo
"$comando eseguito correttamente<br />\n";
    echo
nl2br($res);
} else {
    echo
'impossibile eseguire ' . $command;
}

?>

Vedere anche ftp_raw().

 
 
 
 
Google
  Web Linuxinfor   
 

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

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

1999-2009 Linuxinfor.com. No rights reserved.