2013-03-31 67 views

回答

1

我有這下載文件 - 而不是鏈接到文件 - 它鏈接到這個php文件運行在服務器上。然後,php返回所需的文件(即下載)。

<?php 
if(empty($_POST['filename']) exit; 
<get the file from the file system> 
header("Cache-Control: "); 
header("Content-type: text/plain"); 
header('Content-Disposition: attachment; filename="'.$_POST['filename'].'"'); 
<echo ref to file>?> 

可能需要爲您的特定目的/ <一些修改。> /是類似的僞代碼中的註釋。 乾杯。

相關問題