[PHP]FTP使用ftp_nlist无法获取文件列表

eays 2005-07-20 11:43:32
<?
$add=$_POST['add'];
$name=$_POST['username'];
$pwd=$_POST['password'];
$connect=ftp_connect($add,21);
$login=@ftp_login($connect,$name,$pwd);
$nlist=ftp_nlist($connect,"/");
ftp_quit($connect);
echo $nlist;
?>

出现
Warning: Invalid argument supplied for foreach() in D:\net_star\myweb\index.php on line 19
不知道是怎么回事,不是用ftp_nlist获取/下的文件列表吗????
高手指点
...全文
380 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shala99 2006-02-16
  • 打赏
  • 举报
回复
你看一下FTP帐号的权限,设置一下就可以了。

llsljh 2005-07-25
  • 打赏
  • 举报
回复
up~!

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧