非匿名会话必须使用加密
Non-anonymous sessions must use encryption
我正在尝试使用 php 命令连接到 FTP。但是当我尝试登录时出现以下错误
Warning: ftp_login(): Non-anonymous sessions must use encryption
我试过的代码:
ftp_connect($ftp_server)
ftp_get($ftp_conn, $local_file, $server_file, FTP_ASCII)
虽然它是通过 FileZilla 连接的。不确定错误的含义。谢谢
您可能应该使用 FTPS 而不是 FTP,这是 link:
的摘录
In order to maintain compatibility with existing non-TLS/SSL-aware FTP clients, implicit FTPS was expected to listen on the IANA Well Known Port 990/TCP for the FTPS control channel, and to 989/TCP for the FTPS data channel. This allowed administrators to retain legacy-compatible services on the original 21/TCP FTP control channel.
FTP 服务器可能位于您连接的端口上,只是告诉您需要通过 FTP 通过 SSL 连接到另一个端口。
在 PHP 中使用 FTP over SSL:ftp_ssl_connect()
。
我正在尝试使用 php 命令连接到 FTP。但是当我尝试登录时出现以下错误
Warning: ftp_login(): Non-anonymous sessions must use encryption
我试过的代码:
ftp_connect($ftp_server)
ftp_get($ftp_conn, $local_file, $server_file, FTP_ASCII)
虽然它是通过 FileZilla 连接的。不确定错误的含义。谢谢
您可能应该使用 FTPS 而不是 FTP,这是 link:
的摘录In order to maintain compatibility with existing non-TLS/SSL-aware FTP clients, implicit FTPS was expected to listen on the IANA Well Known Port 990/TCP for the FTPS control channel, and to 989/TCP for the FTPS data channel. This allowed administrators to retain legacy-compatible services on the original 21/TCP FTP control channel.
FTP 服务器可能位于您连接的端口上,只是告诉您需要通过 FTP 通过 SSL 连接到另一个端口。
在 PHP 中使用 FTP over SSL:ftp_ssl_connect()
。