PHP ftp_raw() Functie
Voorbeeld
Maak verbinding met de FTP-server en voer de opdrachten uit:
<?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");
?>
Definitie en gebruik
De functie ftp_raw() stuurt een raw-opdracht naar de FTP-server.
Syntaxis
ftp_raw(ftp_conn, command);
Parameterwaarden
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
Technische details
Winstwaarde: | Het antwoord van de server als een reeks strings |
---|---|
PHP-versie: | 5+ |
❮ PHP FTP-referentie