PHP ftp_raw() Funktion
Beispiel
Verbinden Sie sich mit dem FTP-Server und führen Sie die Befehle aus:
<?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");
?>
Definition und Verwendung
Die Funktion ftp_raw() sendet einen Raw-Befehl an den FTP-Server.
Syntax
ftp_raw(ftp_conn, command);
Parameterwerte
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
Technische Details
Rückgabewert: | Die Antwort vom Server als Array von Zeichenfolgen |
---|---|
PHP-Version: | 5+ |
❮ PHP-FTP-Referenz