jannis Posted March 16, 2003 Report Share Posted March 16, 2003 man tiek izmantota f-ja filesize, bet kaa vareetu smuki paarveerst rezultaatu GB vai MB? Link to comment Share on other sites More sharing options...
Kaklz Posted March 17, 2003 Report Share Posted March 17, 2003 man tiek izmantota f-ja filesize, bet kaa vareetu smuki paarveerst rezultaatu GB vai MB? ņem un vienkārši to rezultātu padali attiecīgu skaitu reižu ar 1024 vai 1000, kā pats vēlies. doma apmēram tāda, ka dali, kamēr vairs nedalās ar 1024 vai (1000) un tad pieraksti attiecīgo vienību klāt. Link to comment Share on other sites More sharing options...
Venom Posted March 17, 2003 Report Share Posted March 17, 2003 $vesels=$filesize % 1024; $nevesels=$filesize-($vesels*1024); echo $vesels.' Kb '.$nevesels.' bytes'; attiecīgi palielinot 1024*1024 utt dabon Mb, Gb, Tb, Pb... Link to comment Share on other sites More sharing options...
Recommended Posts