Jump to content

Recommended Posts

Posted

I'm using the following code to save a file from a form:

 

<?php
$item_ID=53;
// ADDS IMAGES TO IMAGES FOLDER
$image_name_1 = "$item_ID"."_img1".".jpg";
//Saves newly-named image file
move_uploaded_file($_FILES['img1']['tmp_name'],"../images/$image_name_1");

?>

 

The code works great.

However; some files become turned on their side when viewed on the website.

I'm taking a shot in the dark and thinking it has something to do with the way Windows 8 saves the file. Because if I take the same file and re-save it in photoshop, then upload that file, it is not turned on it's side.

 

Anyway, I cannot alter the code of windows, so is there some php code that I can use to make sure the image isn't turned on it's side when uploaded via my script?

 

Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...