Fonction PHP ftp_raw()
Exemple
Connectez-vous au serveur FTP et exécutez les commandes :
<?php
// connect to FTP server
$ftp_server = "ftp.example.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
// the two lines below is the same as: ftp_login($ftp_conn,"john","secretpassword");
ftp_raw($ftp_conn, "USER john");
ftp_raw($ftp_conn, "PASS secretpassword");
?>
Définition et utilisation
La fonction ftp_raw() envoie une commande brute au serveur FTP.
Syntaxe
ftp_raw(ftp_conn, command);
Valeurs des paramètres
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
Détails techniques
Valeur de retour : | La réponse du serveur sous forme de tableau de chaînes |
---|---|
Version PHP : | 5+ |
❮ Référence FTP PHP