Richard Lynch wrote:
On Wed, May 11, 2005 5:19 pm, Oscar Andersson said:
Is it possibele to save a class in a session
ex.
$cl = new Class();
$SESSION['this_class'] = cl;
hello, Oscar - why don't you try it?
notice how 'Class' is a keyword so you can't name a class 'Class'
notice how if you use '$SE
On Wed, May 11, 2005 6:44 pm, Dan Rossi said:
> I've done this by serializing and unserializing the the object. Its
> been discussed however using shared memory, shm is a better way to do
> it ? Sadly sh doesnt compile as default.
Shared memory would maybe be faster, but then ALL your PHP scripts
On Wed, May 11, 2005 5:19 pm, Oscar Andersson said:
> Is it possibele to save a class in a session
>
> ex.
>
> $cl = new Class();
> $SESSION['this_class'] = cl;
Yes, but...
You'd have to actually use $cl in that last line, and you need to require
the file that defines the class definition *BEFORE
I've done this by serializing and unserializing the the object. Its
been discussed however using shared memory, shm is a better way to do
it ? Sadly sh doesnt compile as default.
On 12/05/2005, at 10:19 AM, Oscar Andersson wrote:
Is it possibele to save a class in a session
ex.
$cl = new Class()
Is it possibele to save a class in a session
ex.
$cl = new Class();
$SESSION['this_class'] = cl;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
5 matches
Mail list logo