2011-08-17 89 views
0

我使用PHP动态创建Word文档,并且需要将它作为附件发送。发送Word文档作为附件

有没有办法做到这一点,将其暂时保存到服务器以便通过电子邮件发送?有没有更好的办法?

<?php 
header("Content-type: application/vnd.ms-word"); 
header("Content-Disposition: attachment;Filename=giftboxnote.doc"); 
?> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"> 
...other stuf... 
</html> 

回答