在一套程序里,如何知道哪个程序占用了较高的系统资源? 可以计算每个文件的的执行时间,配置php.ini中的auto_prepend_fileauto_append_file加入自动解析页面来获取执行时间 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 记录mysql的slow query是常用方法 确认你的每一条查询语句都听从了EXPLAIN的建议 我用的监测文件。<?php//print_r($_SERVER);if ( !function_exists('getmicrotime_t') ) {function getmicrotime_t(){ list($usec, $sec) = explode(" ",microtime()); return $usec; //return ((float)$usec + (float)$sec); }//end func }$time1 = date('Y-m-d H:i:s');$usec = getmicrotime_t();$usec *= 1000; $time = $time1." ".$usec;$phpself=$_SERVER[PHP_SELF];$serverName=$_SERVER[SERVER_NAME];$documentRoot=$_SERVER[DOCUMENT_ROOT];$serverAdmin=$_SERVER[SERVER_ADMIN];$str=$phpself." ;time=".$time." ;serverName=".$serverName." ;documentRoot=".$documentRoot." ;email=".$serverAdmin;$fp = fopen("d:/web/test/include/time.txt","ab");fwrite($fp, $str."\r\n");fclose($fp);//<PRE>?> php如何调试部署 PHP截取HTML字符串 php里的函数有没有好记的方法? mysql插入问题 mysql_num_rows(): supplied argument is not a valid MySQL result resource in E:\apache\Apache2\sites\ 想在网站上放一个相册,大家有什么好的开源相册介绍吗? 关于PHP的执行效率 关于购物车程序! 请问PHP的安装问题!! 帮忙看一下那里有错误 file_exists在PHP的安全模式下被禁用,询替代的解决方法 PHP代码中网页连接附加参数中空格的问题
//print_r($_SERVER);
if ( !function_exists('getmicrotime_t') ) {
function getmicrotime_t(){
list($usec, $sec) = explode(" ",microtime());
return $usec;
//return ((float)$usec + (float)$sec);
}//end func
}
$time1 = date('Y-m-d H:i:s');
$usec = getmicrotime_t();
$usec *= 1000;
$time = $time1." ".$usec;
$phpself=$_SERVER[PHP_SELF];
$serverName=$_SERVER[SERVER_NAME];
$documentRoot=$_SERVER[DOCUMENT_ROOT];
$serverAdmin=$_SERVER[SERVER_ADMIN];$str=$phpself." ;time=".$time." ;serverName=".$serverName." ;documentRoot=".$documentRoot." ;email=".$serverAdmin;
$fp = fopen("d:/web/test/include/time.txt","ab");
fwrite($fp, $str."\r\n");
fclose($fp);
//<PRE>
?>