RE: [PHP4BETA] .PHA file?

From: Date: Tue, 28 Mar 2000 10:08:16 +0000
Subject: RE: [PHP4BETA] .PHA file?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-12730@lists.php.net to get a copy of this message
> Still, not a very elegant solution. There's no way to specify a file that > runs upon the first session start? > > > Is there a file that is auto-run upon the first request for a .php page, > > like the .asa or .jsa files for ASP and JSP? For those that > haven't worked > > with either technology, you can setup session or application > variables in > > this file, and is very useful...Anything like this in PHP4? > > I'm not too familiar with all this but I think you can achive that > via this sort of snippet: > > if (!session_is_registered("var")) > include ("somefile.php"); // sets up 'var' session variable PHPlib has an auto-start file using auto-init. Look for auto_init at http://phplib.netuse.de/documentation/documentation-3.html#ss3.8 Quote: "Whenever a new session is established, that is, a user without a session id connects to your application, the auto_init file is included and executed exactly once." Cheers, Graeme

« previous php.version4 (#12730) next »