W3Schools.com

PHP ftp_pasv() Function


PHP FTP Reference Complete PHP FTP Reference

Definition and Usage

The ftp_pasv() function sets passive mode on or off.

In passive mode, data connections are initiated by the client, not the server. This is useful if the client is behind a firewall.

Syntax

ftp_pasv(ftp_connection,mode)

Parameter Description
ftp_connection Required. Specifies the FTP connection to use
mode Required. Specifies the mode.
  • TRUE = passive mode on
  • FALSE = passive mode off


Example

<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");

ftp_pasv($conn,TRUE);

ftp_close($conn);
?>


PHP FTP Reference Complete PHP FTP Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE