PHP下载文件代码

header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
            header("Pragma: can-cache");
            header("Content-disposition: attachment;filename=".$name);
            header("Content-type: application/unknown");
            $file = fopen($path, "r");
            fpassthru($file);

你可能感兴趣的:(PHP,下载)