2012-10-29 109 views

回答

4

它的工作原理与手册中所描述的一样,只是为数组添加更多路径。

http://book.cakephp.org/1.3/view/1638/Attachments

$this->Email->attachments = array(
    $Path . $fileName, 
    $Path . $someOtherFile 
); 
+0

坦克了很多。为您的参考。我使用了 'code' $ this-> Email-> attachments = array($ this-> data ['form'] ['file0'] ['name'] => $ this-> data ['form'] [ 'file0'] [ 'tmp_name的值'],$这 - >数据[ '形式'] [ '文件1'] [ '名称'] => $这 - >数据[ '形式'] [ '文件1'] [” tmp_name的值']); 'code' 谢谢 –