$result = @ftp_login($conn, $user, $password); if(!$result){ echo "Error: Could not log on as $user<br />"; ftp_quit($conn); exit; } 是有的,但是登录失败。这个用户名和密码要怎么写? firefox的ftp下载并不需要用户名和密码,但是ftp_login却要求需要用户名和密码的。我不知道怎么弄,请指点,在oschina提问他们都没理我,可能是觉得问题太低级了。。
我尝试链接其他站,却得出如下结果,无法获取服务器文件时间,也无法下载文件 Mirror Update Connected to ftp.debian.org. Logged in as anonymous Checking file time... Local file last updated14:02 24-May-2014 Can't access remote file time. Getting file from server... Error: Could not download file
if(!$result){
echo "Error: Could not log on as $user<br />";
ftp_quit($conn);
exit;
}
是有的,但是登录失败。这个用户名和密码要怎么写? firefox的ftp下载并不需要用户名和密码,但是ftp_login却要求需要用户名和密码的。我不知道怎么弄,请指点,在oschina提问他们都没理我,可能是觉得问题太低级了。。
$url = 'ftp.mozilla.org';
$ftp = ftp_connect($url); //连接 ftp 服务器
ftp_login($ftp, 'anonymous', ''); //用匿名用户登录
$list = ftp_nlist($ftp, '/'); //取得根目录的文件列表
print_r($list);Array
(
[0] => /README
[1] => /index.html
[2] => /pub
)
file_get_contents 读
file_put_contents 写
你的代码我也相信绝对没有问题,但是也显示空白页面,请问该怎么解决,应该不是代码的问题。
我的系统Debian + Netbeans + Netbeans 内置Php,浏览器是iceweasel
速度慢是很正常的
我尝试链接其他站,却得出如下结果,无法获取服务器文件时间,也无法下载文件
Mirror Update Connected to ftp.debian.org.
Logged in as anonymous
Checking file time...
Local file last updated14:02 24-May-2014
Can't access remote file time.
Getting file from server...
Error: Could not download file