PHP ftp_pasv() 函数

PHP 教程 · 2019-01-26 11:13:26

定义和用法

ftp_pasv() 函数把被动模式设置为打开或关闭。

在被动模式中,数据连接是由客户机来初始化的,而不是服务器。这在客户机位于防火墙之后时比较有用。

语法


ftp_pasv(ftp_connection,mode)


参数 描述
ftp_connection 必需。规定要使用的 FTP 连接。
mode 必需。规定模式。
  • TRUE = 被动模式打开
  • FALSE = 被动模式关闭

实例


<?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 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

The Shallows

The Shallows

Nicholas Carr / W. W. Norton & Company / 2011-6-6 / USD 15.95

"Is Google making us stupid?" When Nicholas Carr posed that question, in a celebrated Atlantic Monthly cover story, he tapped into a well of anxiety about how the Internet is changing us. He also crys......一起来看看 《The Shallows》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试