(Man, this reply-all takes some getting used to...)
As long as your objects don't contain any reference variables (see
manual) you can just assign the object to an element of $_SESSION and
leave it at that. The session management code takes care of the
serialization. So you're just duplicating w
Martin Scotta wrote:
> You can use $_SESSION to store the object, and serialize to convert to
> string and reverse
I like that idea. I think I may end up going that route.
I have one question. This is VERY hypothetical, and mostly just to
satisfy a curiosity, but let's assume that you write an
You can use $_SESSION to store the object, and serialize to convert to
string and reverse
http://ar2.php.net/manual/en/language.oop.serialization.php
// file one.php
require 'user.php';
$user = new User();
$_SESSION[ 'user' ] = serialize( $user );
// file two.php
require 'user.php'; // the cla
Hey everyone,
Long time reader, not such a long time poster :-P (though I have posted
to the list occasionally in the past...)
Anyway, I have a general question for the list. Basically, I need to
maintain persistent objects between page refreshes. So, for example, if
while running a PHP script
4 matches
Mail list logo