php code in wordpress for image uploading [closed]
Like @Musa says, remove the check:
<?php$uploaddir = './uploads/image/large_image/'; $file = $uploaddir . basename($_FILES['image2']['name']); $raw_file_name = $_FILES['image2']['tmp_name'];if (move_uploaded_file($_FILES['image2']['tmp_name'], $file)) { echo "success"; } else { echo "error";}
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";}
It is right in your code if you read it... Here it says that it has to be equal to 360x514, just get rid of that IF statement, and just skip to the move_uploaded_file command.