这篇文章主要介绍了PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED问题解决办法,需要的朋友可以参考下
在做FTP资料采集的时候,,需要用到一个PHP函数ftp_connect,这个函数是建立一个新的 FTP 连接,如果成功返回一个连接标识,失败则返回 FALSE.
ftp_connect() 打开一个 FTP 连接,参数 host 为要连接的服务器。host 后面不应以斜线结尾,前面也不需要用 ftp:// 开头。可选参数port 为要连接到的 FTP 器的端口号,如果没有设置或者为0,则会使用默认的端口 21 来连接。
当我去执行我的这个程序的时候,发现报错如下:
复制代码 代码如下:
PHP Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed:
经常之后发现是IPtables的问题,于是我开放了FTP的默认端口,于是就能正常使用了。
遇到这种问题要首先检查自己的服务器的服务,其次就是防火墙问题了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor
