ftp 怎么选择保存路径

WBOY
发布: 2016-06-23 13:57:52
原创
1804 人浏览过

我是用curl的

            $curl = curl_init(); 
            $target_ftp_file = 'ftp://192.168.1.60/p/a.rar';//完整路径

            curl_setopt($curl, CURLOPT_URL,$target_ftp_file);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($curl, CURLOPT_VERBOSE, 1);
            curl_setopt($curl, CURLOPT_FTP_USE_EPSV, 0);
            curl_setopt($curl, CURLOPT_TIMEOUT, 300); // times out after 300s
            curl_setopt($curl, CURLOPT_USERPWD, 'aaa:aaa);//FTP用户名:密码


怎么提示选择保存路径?


回复讨论(解决方案)

没人知道?还是不可以?

在线求解,为什么那些ftp站可以下载保存本地电脑呢?到底是用什么?

你是要上传还是下载?


你是要上传还是下载?




下载

晕,还是弄不成!

$s = curl_exec($curl);
filr_put_contents(文件名', $s);

           $curl = curl_init(); 
            $target_ftp_file = 'ftp://192.168.1.60/p/';//完整路径

            curl_setopt($curl, CURLOPT_URL,$target_ftp_file);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($curl, CURLOPT_VERBOSE, 1);
            curl_setopt($curl, CURLOPT_FTP_USE_EPSV, 0);
            curl_setopt($curl, CURLOPT_TIMEOUT, 300); // times out after 300s
            curl_setopt($curl, CURLOPT_USERPWD, 'aaa:aaa');//FTP用户名:密码
            
$info = curl_exec($curl);
$a = file_put_contents('a.rar', $info);

抱歉,今天小区停网。
不行,弹不出保存框。我采用的ftp类也不可以。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!