In file.php I have this function fsize($file) { $size = filesize($file); $kbsize = $size / 1024; return round($kbsize); } PHP: in other file I have this $size = fsize($target_path); $kbsize = $size; PHP: I know that $size is in bytes, and $kbsize is in kilobytes What this means $kbsize = $size;
<? echo .$kbsize. ?> -->it shows size of uploaded file in kilobytes does that means that $kbsize is the same as $size or what?
Chances are that the second code looked like the previous code (then later changed). You can do this instead: $kbsize = fsize($target_path); PHP: since you will not be using the size variable, and yes they are the same (size = kbsize).