function file_sizes($path){ if(empty($path)){ return 0; } $path = ROOT_PATH . ‘public/static/index/uploads/att/‘.$path; // $path="/public/static/index/uploads/att/2021060398605bd7fa1311afaaa2acc4bf07bf74.pptx"; $path=str_replace("\","/", $path); // $fCont = file_get_contents($path); // return strlen($fCont)/1024; //echo $path;exit; if (file_exists($path)){ return round(filesize($path)/1024,2); }else{ return 0; } }