You are here: Re: to write echo in a file « PHP Language « IT news, forums, messages
Re: to write echo in a file

Posted by macca on 09/30/07 23:20

I tested your function with the code below, only I added my own test
data for the start time and end time... The code below works fine for
me, so unless you are doing something else wrong this should work.


<?php

function time_z() {
$starttime = "0.21875400 1191194097";
$endtime = "0.21875401 1191194097";

$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
return $totaltime;
}

$t = time_z();

$handle = fopen("log.txt", "a+");
fwrite($handle, $t);
fclose($handle);


?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация