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

简单的计算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的日期时间运算总结




<?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( ......

php分页函数

<?php
function page ( $totalPage , $currentPage,$url ,$halfPer=5)
{
$total=$totalPage-1;
$re="<td><a href="\" mce_href="\""$url\" onclick=\"page=prompt('共{$totalPage}页\\n自定义跳转到第几页:','');if(page>0&&page<$total)location.href=this.href+'='+(page-1);r ......

深入解析php模板技术原理【一】

1、模板的由来
在没有模板技术之前,使用PHP开发程序,通常都是php代码和html混编在一起。比如说新闻列表,很可能就是一个newslist.php页面,结构如下:
<?
//从数据库中读取出要显示的新闻记录
?>
<html>
<head>……..
</head>
<body>
<?
While ($news ......

[转] 用 SWIG 构建 PHP 扩展

作者:Martin Streicher, 软件开发人员, Pixel, Byte, and Comma
尽管编写一个 PHP 扩展并不是很困难,而 SWIG 的确进一步简化了这项任务,这主要是因为它自动化了结合 PHP 与 C 或 C++ 所需的工作。若给定对一个函数的描绘 — 函数的名称及其形参 — SWIG 就会生成一个包装程序来将 PHP 与低层代码连接起来。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号