安装

要使用这些 FTP 相关函数,在编译的时候请添加 --enable-ftp 选项。

PHP 的 Windows 版本已内建对此扩展的支持。不需要载入额外的扩展来使用这些函数。

User Contributed Notes

i_djon at hotmail dot com 20-Sep-2017 07:57
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).
jacob at power9 dot pw 29-May-2017 01:58
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).
julian_de_vries at gmx dot de 18-Mar-2016 06:20
If you are using PHP 7 under Windows you have to enable ftp in php.ini with extension=php_ftp.dll.