即使没有上传图像,也会执行“unlink()”方法,为什么会这样,我该如何解决?
If (isset($_FILES["image"]["name"])) {
move_uploaded_file($_FILES["imageUp"]["tmp_name"],
"C:/xampp/htdocs/" . $_FILES["image"]["name"]);
//if (file_exists($delete)) {
unlink($delete);
}
else {
$img = $data['row']->image_name;
}
//}