我正在生成如下文件:
require_once("class/BuildFile.php");
$myfile = BuildFile::createFile($arg1, $arg2);
获取$ myfile临时文件名的最佳方法是什么? 我需要在'createFile'中添加什么来返回文件名和路径?
我想使用PHPMailer
将文件添加为附件$mail->AddAttachment(filename & path of $myfile);
我不确定我是否应该使用tempnam或getPath()或其他东西..
谢谢,如果你能提供帮助..