X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP ftp_get_option() Function

PHP FTP Reference PHP FTP Reference

Example

Return the timeout used for network operations:

<?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);

// could return 90
echo ftp_get_option($ftp_conn,FTP_TIMEOUT_SEC);

// close connection
ftp_close($ftp_conn);
?>

Definition and Usage

The ftp_get_option() function returns runtime options of the current FTP connection.

Syntax

ftp_get_option(ftp_connection,option);

Parameter Description
ftp_connection Required. Specifies the FTP connection to use
option Required. Specifies the runtime option to return. Possible values:
  • FTP_TIMEOUT_SEC - Returns the timeout used for network operations
  • FTP_AUTOSEEK - Returns TRUE if this option is on, FALSE otherwise


Technical Details

Return Value: Returns the value on success, or FALSE if the given option is not supported (a warning message is also thrown)
PHP Version: 4.2+


PHP FTP Reference PHP FTP Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook