Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

filesize not update after change file [duplicate]

Tags:

php

filesize

PHP code

echo filesize("a.jpg")."<br/>";

imagejpeg(imagecreatefromjpeg("a.jpg"), "a.jpg", 50);

echo filesize("a.jpg");

Output

73104
73104

I have change quality of image but filesize not changed!!!

However, the file size changed?! enter image description here

why function filesize not updated immediate after change file?

My image(size 72k) enter image description here

like image 963
ashkufaraz Avatar asked Dec 13 '25 15:12

ashkufaraz


1 Answers

As the manual puts it:

Note: The results of this function are cached. See clearstatcache() for more details.

like image 129
deceze Avatar answered Dec 16 '25 07:12

deceze



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!