0

我每次得到的只是'文件系统上找不到文件'

<?php 
    if($_POST[upload])
    {    
        require_once('incs/phpmailer/phpmailer.php');
        $upload = $_FILES['upload']['tmp_name'];
        $mail = new phpmailer;
        $mail->AddAddress("email@email.com", "Email");
        $mail->AddReplyTo("info@site.com", "Information");
        $mail->WordWrap = 50;    // set word wrap
        $mail->AddAttachment($upload);  // add attachment
        $mail->IsHTML(true);    // set email format to HTML
        $mail->Subject = "Here is the subject";
        $mail->Body = "This is the message body";
        $mail->Send(); // send message
    }      
?>

有谁知道为什么会这样?

非常感激。

4

1 回答 1

0

尝试这个,

$upload = $_FILES['upload']['name'];
于 2013-02-18T20:37:14.390 回答