易截截图软件、单文件、免安装、纯绿色、仅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数据结构——线性表的删除

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 "< ......

PHP的时区问题

装了PHP-5.3.0, 启动的时候总是会有
"[06-Aug-2009 13:27:31] PHP Warning:  PHP Startup: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are stil ......

2010年最新PHP类的精缩归纳


一:结构和调用(实例化):
class className{} ,调用:$obj = new className();当类有构造函数时,还应传入参数。如$obj = new className($v,$v2...);
二:构造函数和析构函数:
1、构造函数用于初始化:使用__construct(),可带参数。
2、但析构函数不能带参数(用于在销去一个类之前执行一些操作或功能)。析构函数 ......

[转] 用 SWIG 构建 PHP 扩展

作者:Martin Streicher, 软件开发人员, Pixel, Byte, and Comma
尽管编写一个 PHP 扩展并不是很困难,而 SWIG 的确进一步简化了这项任务,这主要是因为它自动化了结合 PHP 与 C 或 C++ 所需的工作。若给定对一个函数的描绘 — 函数的名称及其形参 — SWIG 就会生成一个包装程序来将 PHP 与低层代码连接起来。 ......

php生成HTML


< type="text/javascript">
smarty 可以生成,­
其实生成的原理很简单 ­
1、获取你动态页面得内容 ­
2、写入静态文件­
比如: ­
<? ­
//获取文件内容 ­
$content=file_get_contents(http://www.www.com/viewPage.php?id=$id
); ­
//检查是否存在旧文件,有则删除 ­
i ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号