做成链接不就行了?
<a href="ftp://xxx.xxx.xxx.xxx/xxx.rar"> download </a>

解决方案 »

  1.   

    to : feel8(准备早起的鸟) 不行啊,第一,服务器要验证,        第二,速度好慢
      

  2.   

    第三,安全问题,因为这样人家会知道ftp服务器的位置,和用户名,密码
      

  3.   

    <?php// define some variables
    $local_file = 'local.zip';
    $server_file = 'server.zip';// connect to the ftp server
    $conn_id = ftp_connect($ftp_server);
    $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);// try to download
    if (ftp_get($conn_id, $local_file, $server_file, ftp_BINARY)) {
        echo "Successfully written to $local_file\n";
    } else {
        echo "There was a problem\n";
    }// close the connection
    ftp_close($conn_id);?>
      

  4.   

    to: feel8(准备早起的鸟)我的代码也是这么写的,但是这样他就把文件从ftp服务器上下在到www服务器上了,并没有下在到客户机器上啊。如果直接用连接  <a href=ftp://ftpserver/path/>xxx</a>这样是可以实现了,但是这样的话,ftp服务器的密码就回看见了,