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
if($_POST['str'])
{
header('Content-type: application/doc');
header('Content-Disposition: attachment; filename="downloaded.doc"');
echo iconv("UTF-8","GB2312",$_POST['str']);
}
?>
<a href="javascript:void(0)" onclick="downword()">下载</a>
<div id="word" style="dis ......
本文记录一下本人安装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 ......
现在有很多的rss订阅,我们直接可以订阅到邮箱。既然学了PHP,那么有没有一种方法可以直接将rss的新闻信息显示在自己的网页上呢?有的,必须的,下面就是这个rss脚本:
<?php
//RSS源地址列表数组
$rssfeed = array("http://blog.csdn.net/heavenopener/category/668064.aspx/rss");
for($i=0;$i<sizeof($rssfee ......
今天遇到了一个很奇怪的乱码问题,自己无意中解决了,但不知道是什么原因,只好记下来,防止以后再出现这样的问题。
当我把php语句写到下面的页面头信息之前的时候,这些php输出语句都输出的是乱码,包括用echo输出的js。如:echo "<script languge=javascript> alert('添加成功!');location.href = 'device_add.php ......