|
Posted by amygdala on 10/14/86 11:55
> There is no chance to work for it. Simply, there is a syntax error. It
> should be:
> $myArray = array( 'sessionMaxInactive' => 60*5, 'persistentMaxTime' =>
> 60*60*24*30 );
>
Yes you are right of course. Typo on my part in my message. But in my
original script I have that. Now I am confused though:
The full array is this (part of a session class):
private $config = array(
'sessionTable' => DB_TABLE_SESSIONS,
'userTable' => DB_TABLE_USERS,
'persistentMaxTime' => 60*60*24*30,
'sessionMaxInactive' => 60*30,
'regenerateId' => true,
'idRegenerationInterval' => 10,
'cookieName' => 'PHPSESSION',
'cookiePath' => '/',
'checkIp' => true,
'checkAgent' => true
);
which yields the error:
Parse error, parse error, unexpected '*', expecting ')' on line 49 (which is
the line of 'persistentMaxTime')
But this script seems to work fine indeed:
<?php
error_reporting( E_ALL );
$myArray = array( 'sessionMaxInactive' => 60*5, 'persistentMaxTime' =>
60*60*24*30 );
echo $myArray[ 'sessionMaxInactive' ];
?>
[Back to original message]
|