Re: Using and Echoing Session Variables

From: Date: Sun, 18 Jul 2004 16:34:20 +0000
Subject: Re: Using and Echoing Session Variables
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-190917@lists.php.net to get a copy of this message
My intention is: Include a file 1st line on file starts session Include another file, this will execute all the queries I need and set session variables. -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk ----------------------------- "Jason Barnett" <jasbarne@indiana.edu> wrote in message news:20040718111922.70903.qmail@pb1.pair.com... > Harlequin wrote: > > > Jason > > > > Would there be anything wrong with using an include statement at the top of > > every page and the include page could then start a session, execute queries > > etc or would the session not start as it's not the first line in the > > page...? > > > > That's completely fine. The main thing is, you just want to have session keys > get written before you start sending output. > > Just to throw out another idea... Do you plan on having session keys used for > *every* page? If so, then you could set your php.ini auto_prepend_file to > automatically process your session script for every request. The main downside > is if you have pages that don't really need the session vaiables then you'll be > wasting resources when serving those pages.

« previous php.general (#190917) next »