简单的计算php页面处理时间
<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
//例子
//开始
$time_start = getmicrotime();
//这里放你的代码
//结束
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds"; //输出运行总时间
?>
相关文档:
<?php
//GB2312的Encode
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
/*重点了解strtotime()函数
1、strftime比time()好用,可以直接把常用的’2010-02-03‘转成时间戳。
2、date( ......
function delete_array_element($arr,$i) {
$len = count($arr);
for($j=$i; $j<$len; $j++) {
$arr[$j] = $arr[$j+1];
}
array_pop($arr);//将数组的最后一个单元弹出
return $arr;
}
for($i=0; $i<10; $i++) {
$arr1[$i] = $i+1;
}
print_r($arr1);
echo "< ......
作者:Martin Streicher, 软件开发人员, Pixel, Byte, and Comma
尽管编写一个 PHP 扩展并不是很困难,而 SWIG 的确进一步简化了这项任务,这主要是因为它自动化了结合 PHP 与 C 或 C++ 所需的工作。若给定对一个函数的描绘 — 函数的名称及其形参 — SWIG 就会生成一个包装程序来将 PHP 与低层代码连接起来。
......
< type="text/javascript">
smarty 可以生成,
其实生成的原理很简单
1、获取你动态页面得内容
2、写入静态文件
比如:
<?
//获取文件内容
$content=file_get_contents(http://www.www.com/viewPage.php?id=$id
);
//检查是否存在旧文件,有则删除
i ......