简体   繁体   English

ftp_login()错误

[英]ftp_login() error

I have a big error. 我有一个很大的错误。 This is my ftp_connect() PHP code.This code work my localhost but does not work my host (Centos 5.8) 这是我的ftp_connect()PHP代码。这个代码工作我的localhost但不能正常工作(Centos 5.8)

$ftp_username="username";
$ftp_password="pass";
$ftp_host="212.***.***.149";
$ftp_id=ftp_connect($ftp_host);
$ftp_connect=ftp_login($ftp_id,$ftp_username,$ftp_password);

if((!$ftp_id) || (!$ftp_connect))
{
   die("FTP connect error");
}
else
{
   echo "ok";
}

Warning: ftp_login() [function.ftp-login]: Not logged in, unauthorized IP address. 警告:ftp_login()[function.ftp-login]:未登录,未经授权的IP地址。 in /home/sektorel/public_html/xml1.php on line 230 在第230行的/home/sektorel/public_html/xml1.php中

anyone have a solution? 谁有解决方案?

As per the error, your FTP server only allows logins from a range of pre-authorised IP addresses. 根据错误,您的FTP服务器仅允许来自一系列预授权IP地址的登录。 Your server address is not on there. 您的服务器地址不在那里。 Find out the publicly facing IP(s) of the server, and add it/them to the FTP authorisation list. 找出面向公众的服务器IP,并将其添加到FTP授权列表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM