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

解决方案 »

  1.   

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

  2.   

               $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类也不可以。