Persistant variables in PHP?
| From: | Mailing List Mailbox | Date: | Tue, 05 Sep 2000 21:53:14 +0000 |
| Subject: | Persistant variables in PHP? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15392@lists.php.net to get a copy of this message | ||
Is there any built-in method of making variables persistant
across all sessions and users? ie like session variables except
global to all users? This isn't overly hard to add myself but
I'd like to have it handled automaticlly the way sessions are.
For a stupid example I could:
---
persistant ( "hit_counter" );
session_register ( "user_hits" );
$hit_counter++;
$user_hits++;
print "This page has been viewed $hit_counter times, $user_hits by you.";
---
Also any reason why objects don't work w/ sessions? Writing my own
serializer/unserializer that did handle them was trivial. I can't imagine
why it'd be so much harder to code the same thing into the built-in
serializer. Thanks. :)