Beispiel #1
0
<?php

//////////////////////////////
// get the program run time //
//////////////////////////////
// example
$runTime = new \runTime();
$runTime->start();
// do some thing
sleep(1);
$runTime->stop();
echo 'spent:', $runTime->spent();
class runTime
{
    private $starTime;
    private $stopTime;
    private function getMicTime()
    {
        $mictime = microtime();
        list($usec, $sec) = explode(' ', $mictime);
        return (double) $usec + (double) $sec;
    }
    public function start()
    {
        $this->starTime = $this->getMicTime();
    }
    public function stop()
    {
        $this->stopTime = $this->getMicTime();
    }
    public function spent()
Beispiel #2
0
				<li>权限:<?php 
echo $fileInfo->info['perms'];
?>
</li>
				<li>磁盘空间:<?php 
echo $fileInfo->info['disk_total_space'];
?>
</li>
				<li>剩余空间:<?php 
echo $fileInfo->info['disk_free_space'];
?>
</li>
			</ul>
			<div class="right">
		<?php 
$time = $run->stop();
echo '执行时间:' . $time;
?>
			</div>
		</div>
		<div class="row-3">
	<?php 
if ($fileInfo->info['isVist']) {
    echo '<a href="./' . ROOT . '/' . $fileInfo->info['path'] . '"><div class="vist-button">访问</div></a>';
}
?>
			<div class="row-3-1 row-3-hd">
				<ui>
					<li class="first">名称</li>
					<li>创建时间</li>
					<li>类型</li>