fgets moves the position in the file pointer, you need
echo (time()).">>";
$old=fgets($fp);
echo $old." = ";
$new=time();
echo ">>>".($new - $old)."<<<";
pei_world wrote:
I have a problem in time substraction.
the number print out correct, but don't know
why i cann't do the
I have a problem in time substraction.
the number print out correct, but don't know
why i cann't do the substraction between them
===
echo (time()).">>";
echo (fgets($fp))." = ";
$new=time();
$old=fgets($fp);
echo ">>>".($new - $old)."<<<";
2 matches
Mail list logo