Answer the question
In order to leave comments, you need to log in
Filesize php how to compare size?
I'm parsing the site, you need to skip posts where the picture with the address is different, but with the content "no photo".
The code
@copy($filmItem->find('div[class=filmImage] a img', 0)->src, $_SERVER['DOCUMENT_ROOT'].'/uploads/temp_file_img');
if ( filesize($_SERVER['DOCUMENT_ROOT'].'/uploads/temp_file_img') != filesize($_SERVER['DOCUMENT_ROOT'].'/uploads/atal_file_img') )
Answer the question
In order to leave comments, you need to log in
And where did you get the idea that it "skips" if?
Use a debugger to see what is returned from both filesize() calls.
Well, it’s more correct to compare numbers with strong typing:
By the way, both filesize() can return false for you (and generate a warning at a certain level of showing errors) due to an error.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question