Javatpoint Logo
Javatpoint Logo

PHP ftp_get_option( ) Function

The ftp_get_option() function is used to retrieve various runtime behaviours of the current FTP stream. This function was introduced in PHP 4.2.0.

Syntax:

Parameter Description Is compulsory
ftp_stream The link identifier of the FTP connection. compulsory
Option Specifies which runtime behaviour to return. Possible values:
FTP_TIMEOUT_SEC - Returns the time limit for network operations
FTP_AUTOSEEK - Returns TRUE if this option is on, FALSE otherwise
compulsory

Return value:

The ftp_get_option() function returns the value on success or FALSE if the given option is not supported. In the latter case, a warning message is also thrown.

Example 1

Explanation

In the above example, with the help of ftp_get_option() function we can get the various runtime behaviours of the current FTP stream.

Example 2

Explanation

In the above example, with the help of ftp_get_option() function we can get the timeout used for network operations.


Next TopicPHP FTP





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA