2016-04-26 60 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

是还有其他方法吗? –

相关问题