以前用的是ASP程序,现在买了个外国空间需要用PHP才行,哪位大哥帮帮忙啦!帮我转换下!~谢谢!
 

解决方案 »

  1.   

    function downloadfile($fullpath)
    {
      if(!file_exists($fullpath))
        return false;
      $filesize = filesize($fullpath);
      
      $qvodpath = strtolower($_POST['qvodurl']);
      if(strpos($qvodpath, "qvod://') !== false)
      {
         $arrstr = explode("|", $qvodapth);
         $basename = $arrstr[1];
         $strfilename = $arrstr[2];
      }   Header("Content-Type: application/octet-stream;");
       Header("Content-Disposition: attachment; filename=\"" . $strFileName . "_" . $bashname .  ".exe\"");
       Header("Content-Length: $filesize");
       Header('Accept-Ranges: bytes');
       echo file_get_contents($fullpath);
    }//dy.exe 前面要加绝对路径和相对路径都可以
    downloadfile("dy.exe");
      

  2.   

    谢谢“jakey9826”但是不对啊!求救啊~!