Jump to content
php.lv forumi

hmm


SkaKri

Recommended Posts

Tāpēc, ka lieto php4, kuram microtime neatgriež floatu, bet stringu atdalītu ar atstarpi.

Ja lieto php5, tad der iepriekšējais piemērs, ja lieto php4, tad jāraksta šādi:

$time_start = array_sum(explode(' ', microtime()));

(tas pats arī ar $time_end)

Link to comment
Share on other sites

ha bet kas tas par sviestu?

 

 

 

<?php
$time_start = array_sum(explode(' ', microtime()));        
?>
bla bla bla

<?php
$time_end = microtime(true);
$time = $time_end - $time_start;
//$time = round($time,3);
echo "<div class=small_w>Lapa ielādēta $time sekundēs.</div>\n";
?>

 

Lapa ielādēta -1123584162.603 sekundēs.

:blink:

Link to comment
Share on other sites

×
×
  • Create New...