在国产在线视频a在线视频,国产欧美一区二区三区网站,国内精产品一二二三的区别,国产日韩精品91

    <s id="gmbiu"></s>

        <sup id="gmbiu"><thead id="gmbiu"><input id="gmbiu"></input></thead></sup>
        <strike id="gmbiu"></strike>

        管理員登陸

        php計算頁面執(zhí)行時間

        在PHP網(wǎng)頁的開頭加入以下
        <?
        $time_start = getmicrotime(); 
        function getmicrotime()
        {
        list($usec, $sec) = explode(" ",microtime());
        return ((float)$usec + (float)$sec);
        }
        ?>

        然后到最后加入以下代碼

        <?
        $time_end = getmicrotime();
        printf ("[頁面執(zhí)行時間: %.2f毫秒]\n\n",($time_end - $time_start)*1000);
        ?>

        ************** Other code *************

        <?php 
        $stime=microtime(true); //獲取程序開始執(zhí)行的時間 
        echo "hello world";         //你執(zhí)行的代碼 
        $etime=microtime(true);//獲取程序執(zhí)行結(jié)束的時間 
        $total=$etime-$stime;   //計算差值 
        echo "<br />{$total} times"; 
        ?> 

        信息科技 2006-09-12 09:23:49 通過 網(wǎng)頁 瀏覽(3517) 打印

        上一篇

        小學乘法表

        共有0條評論!

        發(fā)表評論