【发布时间】:2010-11-16 23:52:10
【问题描述】:
我正在使用 PHP 发送带有附件的电子邮件。附件可以是多种不同文件类型(pdf、txt、doc、swf 等)中的任何一种。
首先,脚本使用“file_get_contents”获取文件。
后来,脚本在头部回显:
Content-Type: <?php echo $the_content_type; ?>; name="<?php echo $the_file_name; ?>"
如何为 $the_content_type 设置正确的值?
【问题讨论】:
标签: php email content-type file-get-contents