安装
要使用这些 FTP 相关函数,在编译的时候请添加 --enable-ftp 选项。
PHP 5 的 Windows 版本已内建对此扩展的支持。不需要载入额外的扩展来使用这些函数。
从 PHP 7.0.0 开始的 Windows 版本,默认以动态的方式载入该扩展,使用前需要在 php.ini 中开启该扩展。

User Contributed Notes 3 notes
i_djon at hotmail dot com ¶
4 years ago
For some reason folks downvoted the previous entry for this, BUT... indeed, as of PHP 7, to enable this on Windows you have to add the line:
extension=php_ftp.dll
to your php.ini to resolve PHP errors that tell you PHP FTP functions are not defined; the line isn't in there (where, many things are and are just commented out).
julian_de_vries at gmx dot de ¶
6 years ago
If you are using PHP 7 under Windows you have to enable ftp in php.ini with extension=php_ftp.dll.
jacob at power9 dot pw ¶
5 years ago
On linux, one would enable ftp on their php7 server by uncommenting or adding the line "extension=ftp.so" in their php.ini file (likely at /etc/php/php.ini, unless the user moved it).