Interesting problem - PHP 4.3, IIS5, ISAPI

From: Date: Fri, 14 Feb 2003 19:48:18 +0000
Subject: Interesting problem - PHP 4.3, IIS5, ISAPI
Groups: php.windows 
Request: Send a blank email to php-windows+get-18541@lists.php.net to get a copy of this message
I am trying to output the page runtime to omake a comparison between php and Coldfusion. I have 2 functions one to start a timer, one to end a timer. The php code block in the middle between reads a 140mb file and does some other stuff. This is fairly unimportant at this point. With the code block in between the timer functions present, the timer functions don't output the processing time. When I remove the code block, the timer functions work great...I don't get it!! Help! CODE: -------------------------- <? function startTiming() { global $startTime; $microtime = microtime(); $microsecs = substr($microtime, 2, 8); $secs = substr($microtime, 11); $startTime = "$secs.$microsecs"; } startTiming(); ?> <HTML> <HEAD> <TITLE>Stats Server</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> </HEAD> <BODY> <? $fp = fopen("d:\www\ex030124.log", "r"); $i = 0; while (!feof($fp)) { $rowData = fgets($fd); /* if(substr($rowData, 1, 1) == "#") { $iisTitle = preg_split(":", $rowData, "1"); echo $iisTitle . "<BR>"; } */ $i++; //echo $i . "<BR>"; } ?> </BODY> </HTML> <? function stopTiming() { global $startTime; $microtime = microtime(); $microsecs = substr($microtime, 2, 8); $secs = substr($microtime, 11); $endTime = "$secs.$microsecs"; echo "<HR>Execution time " . ($endTime - $startTime) . " seconds."; } stopTiming(); ?>

« previous php.windows (#18541) next »