Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8893813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:20:33+00:00 2026-06-14T23:20:33+00:00

Please help with php code: I have following code what makes only 360×514 images

  • 0

Please help with php code:

I have following code what makes only 360×514 images to be uploaded only.
My question is: how can I edit it to make any size uploadable without error message?

<?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";
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:20:34+00:00Added an answer on June 14, 2026 at 11:20 pm

    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";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please help i have the following php code for my login session but i
i am new in php i have a problem in my php code.please help
I have set the following Code within WebController.php /** * Export order grid to
Please provide a simple solution to the following problem in concise PHP type code
I have tried the following code in single.php file in wordpress. I used these
I have the following PHP code for one of my blocks <?php global $base_url;
I hope someone can help. The following piece of php code (see below) is
I have the following PHP code to display my tag cloud. It seems if
I have tried the following code <?php foreach ($_wishlistitemCollection as $_wishlistitem): $_product = $_wishlistitem->getProduct();
I am using wordpress and on the page sidebar.php I have the following code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.