0

我有这个代码

if(move_uploaded_file($_FILES['file1']['tmp_name'], $upload_directory . $filename)){
//http file
    $fullurl = $siteurl.'/'.$upload_directory.'/'.$filename;
    //insert db
    mysql_query("insert into up_guest(name,type,time,ip) values('$filename','$filetype',$time,'$ip')");
    print "<br><br>";
    print "فایل با موفقیت آپلود شد!";
    print "<br><br>";
    print "<font color='black'>Uploaded File is {$filename} and its size is {$_FILES['file1']['size']} bytes </font>";
}//file upload she
else{
    echo $_FILES['file1']['error'];
}

如果它运行并成功上传文件,没有任何错误
ANDDDDDDDDDDDDD 也运行 !!!
文件错误为 0 !
问题是什么?

4

1 回答 1

1

多文件上传数组 move_uploaded_file($_FILES['file1']['tmp_name'], $upload_directory . $filename) 这不是缺少'/'

move_uploaded_file($_FILES['file1']['tmp_name'], $upload_directory .'/' . $filename)

我看到你有使用'/'的下一行代码

于 2013-01-25T08:54:33.820 回答