note 32355 deleted from function.dirname by danbrown

From: Date: Sun, 20 Jul 2008 19:09:11 +0000
Subject: note 32355 deleted from function.dirname by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142276@lists.php.net to get a copy of this message
Note Submitter: philb at gmx dot net ---- <?php // if you like put this into an include file 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; } ?> <?php // execute like this... echo "dir last updated "; ShowDirModTime($HTTP_SERVER_VARS["PATH_TRANSLATED"]); ?>

« previous php.notes (#142276) next »