当前位置: 首页> 函数类别大全> ftp_get

ftp_get

从 FTP 服务器下载文件。
名称:ftp_get
分类:未分类
所属语言:php
一句话介绍:从 FTP 服务器下载文件。

ftp_get 函数说明

<h2>适用 PHP 版本</h2>
<p>PHP 4.0.2及以上版本。</p>

<h2>函数说明</h2>
<p>ftp_get 函数用于从FTP服务器下载文件。</p>

<h2>函数语法</h2>
<p>ftp_get( resource $ftp_stream, string $local_file, string $remote_file, int $mode, int $resumepos = 0 ): bool

ftp_get($ftp_stream, 'localfile.txt', 'remotefile.txt', FTP_BINARY);

<h2>示例代码的说明</h2>
<p>该示例代码展示了如何使用 ftp_get 函数从FTP服务器下载一个文件。"localfile.txt" 是要保存的本地文件,"remotefile.txt" 是服务器上的远程文件,传输模式采用二进制模式(FTP_BINARY)。</p>
同类函数
热门文章