请帮助使用php代码:
我有以下代码只上传 360x514 图像。我的问题是:如何编辑它以使任何大小都可以上传而不会出现错误消息?
<?php
$MAXIMUM_FILESIZE = 5 * 1024 * 1024;
$uploaddir = './uploads/image/large_image/';
$file = $uploaddir . basename($_FILES['image2']['name']);
$raw_file_name= $_FILES['image2']['tmp_name'];
list($width, $height) = getimagesize($_FILES['image2']['tmp_name']);
if ($width==360 && $height==514) {
if (move_uploaded_file($_FILES['image2']['tmp_name'], $file)) {
echo "success";
}
else {
echo "error";
}
}else {
echo "size_error";
}
?>