Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // remainder
- //echo date('d');
- echo fmod(date('d'), 6);
- // fmod return the remainder.
- // function filesize
- function niceSize($size)
- {
- define("SIZESTEP", 1024.0);
- static $sizeUnits = Array(" B","KB","MB","GB","TB","PB","EB");
- if($size==="") return "";
- $unitIndex = 0;
- while($size>SIZESTEP)
- {
- $size = $size / SIZESTEP;
- $unitIndex++;
- }
- if($unitIndex==0) {
- return number_format($size, 0)." ".$sizeUnits[$unitIndex];
- } else {
- return number_format($size, 1, ".", ",")." ".$sizeUnits[$unitIndex];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement