Venom Posted February 22, 2005 Report Share Posted February 22, 2005 es ceru ka šis bija joks vai no ātras rakstīšanas echo "formatsize($sum)"; reizināt ar 100, lai pēc tam izdalītu ar 100? hm... Link to comment Share on other sites More sharing options...
bubu Posted February 22, 2005 Report Share Posted February 22, 2005 (edited) Lynx: Šito round($file_size / 1048576 * 100) / 100 var uzrakstīt daaaudz smukāk: round($file_size/(1>>20), 2); :) Edit: Venom, viš gribēja 2 ciparus aiz komata atstāt :) Edited February 22, 2005 by bubu Link to comment Share on other sites More sharing options...
bubu Posted February 22, 2005 Report Share Posted February 22, 2005 1 Mb=1024 Kb1 Kb=1024 b round($sizeinbytes/1024^2,1) 14067[/snapback] emm, Venom, vai tad ^ nav xor? Link to comment Share on other sites More sharing options...
Lynx Posted February 22, 2005 Report Share Posted February 22, 2005 O, Paldies Bubu. Un jaa, gribeju 2us ciparus aiz komata tapec taa. Link to comment Share on other sites More sharing options...
Venom Posted February 22, 2005 Report Share Posted February 22, 2005 emm, Venom, vai tad ^ nav xor? viss, es zināju, ka ar tādām galvassāpēm kodēt jēgas nav. aiziet LJ Link to comment Share on other sites More sharing options...
Venom Posted February 22, 2005 Report Share Posted February 22, 2005 Un jaa, gribeju 2us ciparus aiz komata tapec taa. atgādināja kā es Javā kko tādu raxtīju (: viss oki Link to comment Share on other sites More sharing options...
bubu Posted February 22, 2005 Report Share Posted February 22, 2005 Es ar šitā rasktīju iekš qbasic'a kautkad sen sen :) Link to comment Share on other sites More sharing options...
рпр Posted February 22, 2005 Report Share Posted February 22, 2005 vajag izmantot sprintf formateetiem stringiem. Link to comment Share on other sites More sharing options...
bubu Posted February 22, 2005 Report Share Posted February 22, 2005 vajag izmantot sprintf formateetiem stringiem. 14078[/snapback] qbasic'ā nav sprintf :)) Link to comment Share on other sites More sharing options...
Recommended Posts