Home > PHP > Function > FTP > ftp_pasv()

ftp_pasv()

ftp_pasv - Turns passive mode on or off

Syntax

bool ftp_pasv (resource $ftp_stream, bool $pasv)

Arguments

  • ftp_stream - The link identifier of the FTP connection.
  • pasv - If TRUE, the passive mode is turned on, else it\'s turned off.

Description

ftp_pasv() turns on or off passive mode. In passive mode, data connections are initiated by the client, rather than by the server. It may be needed if the client is behind firewall.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.