$str = dirname($PHP_SELF); $arr = split('/', $str); $num = count($arr); $num = $num - 1; $TheDIR = $arr[$num]; echo $TheDIR; function ShowDirModTime($FullPath) { $BasePath = dirname ($FullPath); $time = filectime($BasePath); $time=time()-$time; $weeks=$time/604800; $days=($time%604800)/86400; $hours=(($time%604800)%86400)/3600; $minutes=((($time%604800)%86400)%3600)/60; $seconds=(((($time%604800)%86400)%3600)%60); $timestring='[ '; if(round($days)) $timestring.=round($days)."d "; if(round($hours)) $timestring.=round($hours)."h "; if(round($minutes)) $timestring.=round($minutes)."m "; if(!round($minutes)&&!round($hours)&&!round($days)) $timestring.="".round($seconds)."s "; $timestring.=']'; echo $timestring; } ?> 0) { $najveci = $trenutni; } echo "$Dir/$File = $trenutni
"; } } } return $najveci; } $broj = Read_Dir("./"); echo $broj . '
'; echo date("d.m.Y",$broj); function path_to_root($path) { $pathinfo = pathinfo($path); $deep = substr_count($pathinfo[dirname], "/"); $path_to_root = "./"; for($i = 1; $i <= $deep; $i++) { $path_to_root .= "../"; } return $path_to_root; } path_to_root($REQUEST_URI);