When doing FTP data acquisition, need to use a PHP function Ftp_connect, this function is to establish a new FTP connection, if the successful return of a connection identity, failure will return FALSE.
Ftp_connect () opens an FTP connection with the parameter host being the server to which you want to connect. The host should not end with a slash, and the front does not need to start with ftp://. Optional parameter port is the port number of the FTP port to which you want to connect, and if it is not set or 0, the default ports 21来 connection will be used.
When I went to execute my program, I found the following error:
Copy CodeThe code is as follows: PHP Warning:ftp_connect (): Php_network_getaddresses:getaddrinfo failed:
Often later found to be the problem of iptables, so I opened the FTP default port, so it can be used normally.
The problem is to check the service of your server first, and then the firewall problem.
http://www.bkjia.com/PHPjc/764613.html www.bkjia.com true http://www.bkjia.com/PHPjc/764613.html techarticle when doing FTP data acquisition, need to use a PHP function Ftp_connect, this function is to establish a new FTP connection, if the successful return of a connection identity, failure will return FALSE ...