I have some problems with ftp_connect()
; I can't connect to my own FTP-server via ftp.localhost or ftp.edgren.myftp.org. I got this error message when I try to connect:
Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in ...
I use this code: $conn_id = ftp_connect('ftp.localhost') or die("Couldn't connect to localhost");
What's the problem? I use the basic FTP-server program Wing FTP Server to host my server.
Thanks in advance.
Try connecting to 127.0.0.1. Localhost is just an alias to that IP, so if localhost doesn't work, the IP will.