PHP ftp_close() Function

The ftp_close() function is used to closes an FTP connection or given link. This function introduced in PHP 4.2.0

Syntax:

ParameterDescriptionIs compulsory
ftp_connection/ftp_streamThe link identifier of the FTP connection.compulsory

Returns

The ftp_close( ) function returns TRUE on success or FALSE on failure.

Important note: After calling this function, you can no longer use the FTP connection and must create a new one with ftp_connect().

Example 1

By Using ftp_connect function we opens an FTP connection and by using ftp_close function we can closes an FTP connection.

Example 2

The ftp_close() function closes an FTP connection.


Next TopicPHP FTP




Latest Courses