2016-04-26 188 views
0

這裏我爲$ report_content內容生成點RTF文件。 它成功生成了點RTF文件。 不需要文件下載選項,我想移動一些位置。 怎麼辦?如何使用PHP將下載文件保存到特定位置

<?php 
//load the rtf template as a string  
$email_id = '[email protected]';  
$file_dir = 'uploads/'; 
$report_content = " 
<html> 
    <body> 
     Hello, This is testing<br /><br /> 
     message.  
    </body> 
</html>"; 

//and now serve the file as an rtf download: 
echo $report_content; 

header("Content-type: application/rtf"); 
header("Content-Disposition: attachment;filename=rtf.rtf"); //How to save in $file_dir 
exit(); 

請更新任何其他方式。

+1

http://stackoverflow.com/questions/8405180/prompt-user-to-save-file-to-a-specific-location –

回答

0

1)由於安全問題而無法實現。

2)你有建議用戶保存特定位置

+0

是還有其他方法嗎? –

相關問題