I am creating a Word document dynamically using PHP, and I need to send it as an attachm开发者_高级运维ent.
Is there a way to do this that will save it to the server temporarily in order to email it? Is there a better way?
<?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>
You should have a look on programmershelp and on Stackoverflow: Create Word Document using PHP in Linux and also there.
精彩评论