Re: Singleton

From: Date: Tue, 23 Oct 2001 22:02:58 +0000
Subject: Re: Singleton
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71955@lists.php.net to get a copy of this message
Use sessions (like session_start() ) -- Andrey Hristov Web Developer Icygen Corporation BUILDING SOLUTIONS http://www.icygen.com On Tuesday 23 October 2001 11:55 am, you wrote: > I'd like to to make a Singleton object in PHP4. > I'm trying to use a static variable in a function to do that. > Every time I use the reload in the Browser client, the file doesn't seem > to keep the information (I kind of expected that). > > I could think only 2 ways to do that. > 1. Using shared memory -> which I don't think is really an option for it > would make the code to difficult to manage later on. > 2. Using environment variables -> which would not be good to store any > kind of data, such as a pointer to an open file. > > Any suggestions anyone ? > > Thanks, > Victor

« previous php.general (#71955) next »