douwu5009 2011-10-22 20:58
浏览 106

无法通过ftp_connect()连接到我的FTP服务器

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.

  • 写回答

1条回答 默认 最新

  • douquan1015 2011-10-22 21:12
    关注

    Try connecting to 127.0.0.1. Localhost is just an alias to that IP, so if localhost doesn't work, the IP will.

    评论

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题