易截截图软件、单文件、免安装、纯绿色、仅160KB

php获取程序执行的时间

在head.htm中加入,也就是在默认模版中添加“$stime=microtime(true); //获取程序开始执行的时间”

<!--<?php
$stime=microtime(true); //获取程序开始执行的时间
$GuideFid[$fid]=str_replace("<a href='$webdb[www_url]' class='guide_menu'>>首页</a>","",$GuideFid[$fid]);
$fupId=intval($fupId);
$topMenu[$fupId]='ck';
print <<<EOT
-->
这里是网页
再在foot.htm修改如:
<!--
EOT;
$etime=microtime(true);//获取程序执行结束的时间
$total=$etime-$stime;   //计算差值
echo "<br />[页面执行时间:{$total} ]秒";
?>


相关文档:

重要的PHP超级全局变量总结




重要的PHP超级全局变量总结

2008-07-14 16:53:03
 标签:全局变量
   [推送到技术圈
]
        PHP有9个预定义变量数组,分别总结如下:
 
1、$_SERVER
       
$_SERVER超级全局变量包含由web服务器创建的信息 ......

PHP获取时间差函数

//计算距公元1年1月1日的天数,$yyyy年分,$mm月份,$dd日
function datelocal($yyyy,$mm,$dd){
$monthdays = array(31,28,31,30,31,30,31,31,30,31,30,31); //非闰年的月份天数
//判断是否为闰年,闰年$leapyear = 1,否则 $leapyear = 0
if($yy%4==0 && $yyyy%100!=0 || $yyyy%400==0)
$leapyear = 1;
els ......

LAMP(Linux+Apache+Mysql+PHP)部署日志

本文记录一下本人安装LAMP的全过程
本人使用的Linux为RedHat Enterprise 5 X64
第一步:安装Mysql
Mysql的安装比较简单,为了避免出现文件找不到的情况,我依次下载安装了以下4个RPM包
MySQL-server-community-5.1.46-1.rhel5.x86_64.rpm
MySQL-client-community-5.1.46-1.rhel5.x86_64.rpm 
MySQL-devel-commu ......

PHP统计网站访问次数防刷新

<?
@session_start();
$counter = intval(file_get_contents("counter.dat"));
if(!$_SESSION['jingyun'])
{
$_SESSION['jingyun'] = true;
$counter++;
$fp = fopen("counter.dat","w");
fwrite($fp, $counter);
fclose($fp);
}
?>
总访问 <span style="font-size:14px; color:#FF6600" mce_sty ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号