PHP ftp_set_option() Funktion
Beispiel
Zeitüberschreitung für Netzwerkvorgänge festlegen:
<?php
// connect and login to FTP server
$ftp_server = "ftp.example.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
$login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass);
// set network operation timeout to 120 seconds
echo ftp_set_option($ftp_conn,FTP_TIMEOUT_SEC,120);
// close connection
ftp_close($ftp_conn);
?>
Definition und Verwendung
Die Funktion ftp_set_option() setzt Laufzeitoptionen der aktuellen FTP-Verbindung.
Syntax
ftp_set_option(ftp_conn, option, value);
Parameterwerte
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
option | Required. Specifies the runtime option to set. Possible values:
|
value | Required. Specifies the value of the option parameter |
Technische Details
Rückgabewert: | TRUE, wenn die Option gesetzt werden konnte, FALSE, wenn nicht (es wird auch eine Warnmeldung ausgegeben) |
---|---|
PHP-Version: | 4.2+ |
❮ PHP-FTP-Referenz