Re: Problem with session variables on Mac
| From: | Mike Migurski | Date: | Thu, 25 Dec 2003 18:45:35 +0000 |
| Subject: | Re: Problem with session variables on Mac | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173322@lists.php.net to get a copy of this message | ||
> $session_time = $current_time - $_SESSION('timestamp');
> echo "session time = $session_time seconds.<br>";
>
>The output to the browser (Safari) is as follows:
>
>inside check IF
>Time = 1072308706.
>
>Fatal error: Call to undefined function: array() in
>/Library/WebServer/Documents/testit/Logsafe_project/user_auth_fns.php
>on line 35
>
>As you can see, the code bombs as soon as it hits the
>$_SESSION('timestamp').
$_SESSION is an array, therefore its elements are indexed like so:
$_SESSION['timestamp'].
-mike.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html