远程打开ftp上的文件
itian 2008-12-12 12:24:02 php版本4.3.4,allow_url_fopen 为 On,浏览器能打开http及ftp,服务器端命令行能wget http及ftp
使用file,fopen,file_get_contents能打开http
但是执行
file("ftp://user:pass@www.site.com/1.log");
时报错如下:
Warning: file(ftp://...@www.site.com/1.log): failed to open stream: FTP server reports 530 Please login with USER and PASS.
就是file函数用...代替了user:pass导致登陆验证失败。
不知道有没有人遇到过这种情况,如何解决?