FTP的LIST命令
我用Winsock连上FTP服务器,然后传送:LIST命令,结果总返回:425 Can't open data connection.
我查了MSDN,其中说:When an FTP client passes a command to an FTP server and the client is in active mode, the client also passes a port on which it listens for the response from the server. If the client is sending a command that does not require a data port (such as the syst command), the client does not set up a data port. The ls command, also called the list command, requires a data port to return the data. If the server is expecting a data port from the client, and the server does not receive a data port, the server generates the 425 error.
但是并不有给出解决方案,我试着先传送PASV命令,但结果还是报425错。
为什么??