ftp_pasv
Returns whether the current FTP passive mode is on.
ftp_pasv()
function sets the passive mode to on or off.
In passive mode, the data connection is initialized by the client, not the server. This is more useful when the client is behind the firewall.
<?php $conn = ftp_connect("ftp.testftp.com") or die("Could not connect"); ftp_login($conn,"admin","ert456"); ftp_pasv($conn,TRUE); ftp_close($conn); ?>
ftp_pasv ( ftp_connection , mode )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
mode |
Required. Prescribed mode.
|
If the parameter mode is true, passive mode transmission (PASV MODE) is turned on, otherwise, if the parameter mode is false, passive mode is turned off. In the case of passive mode on, the data transfer is initiated by the client, not by the server.
Return true if successful, and false if failed.