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();
请更新任何其他方式。
http://stackoverflow.com/questions/8405180/prompt-user-to-save-file-to-a-specific-location –