Jump to content

Recommended Posts

Hi:

 

I have found that something strange happens in my php script. I wish someone could explain me why.

 

I receive an image via POST, and it is saved as a temporary file in the server:

 

$tmpName  = $_FILES['uploadedfile']['tmp_name'];

 

The filesize I obtain doing: $fileSize = $_FILES['uploadedfile']['size']; is 79733, the same as if I did: filesize($tmpName).

 

Ok. Now, I resize the image, and save it in the same $tmpName, and everything is ok, but when I try to obtain the size, I get the first size, that is: 79733.

 

Anybody has an explanation?

 

Thank you in advance,

 

Xagutxu

 

Link to comment
https://forums.phpfreaks.com/topic/238591-obtaining-size-of-rewritten-image-file/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.