All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Login控件:用户登录失败的消息提示_.net资料_编程技术
PHP技巧:过滤在线编辑器产生的不安全html代码_[PHP教程]
从Access数据库到SQL Server高手_[SQL Server教程]
关于C#3.0,新特性之对象构造者_.net资料_编程技术
php程序如何生成验证码图片_[PHP教程]
ASP.NET底层架构之从浏览器到ASP.NET_.net资料_编程技术
.NET基础知识-.NET框架_[Asp.Net教程]
PHP技巧:php技术生成静态页面的实现_[PHP教程]
在PHP中全面阻止SQL注入式攻击之二_php资料_编程技术
ASP.NET实现中文汉字验证码_[Asp.Net教程]
Reading number is top 10 pictures
Household design comfortable contracted
西游日记4
In the world the most mysterious 21 place landscape2
恶搞漫画2
漂亮的跳舞妹妹2
Average female college students2
每天进步一点点
The money of more than 100 countries and regions4
青涩甜美-王祖贤小时候的旧照片曝光
这才是真正的人体艺术3
Download software ranking
Boxer's Top ten classic battle7
小黑猫大战两米大花蛇
jdk1.6 for windows
The Bermuda triangle2
Call Of Duty2
White deer villiage
都市狐狸姑娘传
Professional killers2 for Android
VC++6.0简体中文版
Eclipse 4.2.2 For Win32
归海一刀 published in(发表于) 2014/2/17 7:35:59 Edit(编辑)
PHP技巧:一个页面执行时间类_[PHP教程]

PHP技巧:一个页面执行时间类_[PHP教程]

PHP技巧:一个页面执行时间类_[PHP教程]

PHP代码
class Timer//页面执行时间类
{
var starttime;//页面开始执行时间
var stoptime;//页面结束执行时间
var spendtime;//页面执行花费时间

function getmicrotime()//获取返回当前微秒数的浮点数
{
list(usec,sec)=explode(" ",microtime());
return ((float)usec + (float)sec);
}

function start()//页面开始执行函数,返回开始页面执行的时间
{
this->starttime=this->getmicrotime();
}

function display()//显示页面执行的时间
{
this->stoptime=this->getmicrotime();
this->spendtime=this->stoptime-this->starttime;
return round(this->spendtime,10);
}
}
/*调用方法
timer=new Timer();
timer->start();
/*在此处放入你要执行的脚本或代码
for(i=0;i<100000;i++)
{
echo i;
echo "
";
}
*/
//echo "

执行该代码花费时间".timer->display()."秒";
?>






添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.