如何获取临时文件名,以便我可以将其添加为邮件附件?

时间:2013-06-08 04:32:40

标签: php phpmailer email-attachments

我正在生成如下文件:

require_once("class/BuildFile.php");

$myfile = BuildFile::createFile($arg1, $arg2);

获取$ myfile临时文件名的最佳方法是什么? 我需要在'createFile'中添加什么来返回文件名和路径?

我想使用PHPMailer

将文件添加为附件
$mail->AddAttachment(filename & path of $myfile);

我不确定我是否应该使用tempnam或getPath()或其他东西..

谢谢,如果你能提供帮助..

0 个答案:

没有答案