开发者

Send Word document as an attachment

开发者 https://www.devze.com 2023-03-28 23:38 出处:网络
I am creating a Word document dynamically using PHP, and I need to send it as an attachm开发者_高级运维ent.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号