Home > Backend Development > PHP Tutorial > PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED problem solution_PHP tutorial

PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED problem solution_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:30:46
Original
2661 people have browsed it

When collecting FTP data, you need to use a PHP function ftp_connect. This function is to establish a new FTP connection. If it succeeds, it returns a connection identifier. If it fails, it returns FALSE.
ftp_connect() opens an FTP connection, parameters host is the server to connect to. The host should not end with a slash, and it does not need to start with ftp://. The optional parameter port is the port number of the FTP server to be connected. If it is not set or is 0, the default port 21 will be used to connect.
When I went to execute my program, I found the following error:

Copy the code The code is as follows:
PHP Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed:

I often found out later that it was a problem with IPtables, so I opened the default port of FTP and it can be used normally.
When encountering this kind of problem, you should first check the service of your own server, and the second is the firewall problem.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764613.htmlTechArticleWhen collecting FTP data, you need to use a PHP function ftp_connect. This function is to create a new FTP Connection, returns a connection identifier if successful, returns FALSE if failed...
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template