|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-12-19 23:08 UTC] yohgaki@php.net
[2002-01-06 22:40 UTC] yohgaki@php.net
[2002-01-07 06:31 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 21:00:01 2025 UTC |
the following script will print out unset set the first time it is run although it should actually print 'set' twice; somehow, the variable needs to be globalized again after the session has been registered. normal php4 setup with everything compiled-in. php -v >> 4.0.6devel --------------------- function test() { global $glb_var; session_save_path("e:\\temp"); session_start(); session_register('glb_var'); test2(); print "glb_var='$glb_var'<br>"; global $glb_var; print "glb_var='$glb_var'"; } function test2() { global $glb_var; $glb_var = 'set'; } $glb_var = 'unset'; test();