我正在使用PHP发送带附件的电子邮件.附件可以是几种不同文件类型中的任何一种(pdf,txt,doc,swf等).
首先,脚本使用"file_get_contents"获取文件.
之后,脚本在标题中回响:
Content-Type: <?php echo $the_content_type; ?>; name="<?php echo $the_file_name; ?>"
Run Code Online (Sandbox Code Playgroud)
如何为$ the_content_type设置正确的值?