I am trying to put an include
into my php page but I keep getting an error. This works fine:
<?php
session_start();
$_SESSION['LAST_ACTIVITY'] = time();
etc etc
But if I put this into an include
:
<?php
session_start();
include ('sessiontimer.php');
etc etc
with sessiontimer.php being:
<?php
echo "$_SESSION['LAST_ACTIVITY'] = time();";
?>
and I get the error:
PHP Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in sessiontimer.php on line 2
Is there some rule about including time() or there something else I am missing?