header("Pragma: public");header("Cache-control: max-age=".$expire);//header('Cache-Control: no-store, no-cache, must-revalidate');header("Expires: " . gmdate("D, d M Y H:i:s",time()+$expire) . "GMT");header("Last-Modified: " . gmdate("D, d M Y H:i:s",time()) . "GMT");header("Content-Disposition: attachment; filename=".$showname);header("Content-Length: ".$length);header("Content-type: ".$type);header('Content-Encoding: none');header("Content-Transfer-Encoding: binary" );if($content == '' ) {readfile($filename);}else {echo($content);}exit();這是http里面的一段代碼,可是我用它只能讀出到瀏覽器中。
請(qǐng)問有什么方法點(diǎn)擊鏈接如“下載”便出現(xiàn)一個(gè)彈框然后自己輸入保存名字存起來呢?
料青山看我應(yīng)如是
2023-04-08 13:09:48