phpMailer attachment

前端 未结 7 1960
时光取名叫无心
时光取名叫无心 2020-12-06 08:55

I\'m using this to attach files to an mail after uploading them to my server:

for ($i = 0; $i <= 2; $i++)
{
    $mail->AddAttachment($locatie.$_FILES[\         


        
7条回答
  •  我在风中等你
    2020-12-06 09:30

    Agreeing with @patapizza, but before you check on the filesystem (which you should do anyway), you can also just check for $_FILES like

    for ($i = 0; $i < count($_FILES); $i++){
        // only iterate over the number of files you actually have
    }
    

提交回复
热议问题