RE: [PHP] Singleton

From: Date: Tue, 23 Oct 2001 16:33:45 +0000
Subject: RE: [PHP] Singleton
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71957@lists.php.net to get a copy of this message
This would be very good to access a Singleton with one user, but how would it be done for all users to acess the same object. Is it possible to hold and open file pointer in this object ? Thanks, Victor -----Original Message----- From: Andrey Hristov [mailto:andy@icygen.com] Sent: terça-feira, 23 de outubro de 2001 19:03 To: php-general@lists.php.net Subject: Re: [PHP] Singleton 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#71957) next »