Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以使用名称硬编码的 SwiftMailer 附加文件。但是,如果文件是由用户从 HTML 表单的“文件输入类型控件”上传的,并且必须通过 PHP 脚本与电子邮件一起发送,该怎么办?如何在 SwiftMailer 中指定文件名?
谢谢!
我很确定在这种情况下您可以使用 $_FILES['file']['tmp_name'] 值。这给出了临时上传文件的路径。