note 21944 added to function.session-start

From: Date: Fri, 31 May 2002 17:46:44 +0000
Subject: note 21944 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-31302@lists.php.net to get a copy of this message
Instead of using ob_start() you can enable in the php.ini file the output_buffering = yes setting for this to work without that in every page. This will hold the output until the last header is sent, but this is a workaround, not a feature, because you should arrange your code accordingly to send first headers and then output (as c/c++/cgi programmers do). And about session variables, yes they are global, but if you define a function inside the code, for scope reasons the function doesn't get it, so you may get it from the $GLOBALS["session_var_name"] array (the session_var_name goes without $). -- http://www.php.net/manual/en/function.session-start.php http://master.php.net/manage/user-notes.php?action=edit+21944 http://master.php.net/manage/user-notes.php?action=delete+21944 http://master.php.net/manage/user-notes.php?action=reject+21944

« previous php.notes (#31302) next »