/***sesiion1.php****/
Session_Start ();
$_session[' name ']= "AAA";
echo "Save ok! Save to C:/windows/temp ";
?>
/***sesiion2.php***/
Session_Start ();
Echo
";
Print_r ($_session);
Echo
";
?>
The configuration file changes as follows:
; Does not overwrite the process ' s umask.
Session.save_path = "F:/apache HTTP server/tmp"
; Whether to use cookies.
Session.use_cookies = 1
Because I use the appserv-win32-2.5.9 integration environment, not my own configuration of the environment, so I have php.ini-dist and php.ini-recommend, two files inside the path I have changed to the above. When I run sesiion1.php, and then run SESIION2.PHPD time, but it is more than AAA, but I do not see any files in the TMP directory of the F drive, I see the default C disk Windows/temp There is no file, I am a novice, Please enlighten us, thank you!!
Reply to discussion (solution)
F:/apache HTTP Server/tmp Does this folder have permission to write?
You can use the Session_save_path function to see where the path to your session is saved.
To view Session_save_path, you can write a PHP
Phpinfo ();
?>
View after running: Session.save_path will know.
Print_r (Glob (Session_save_path (). '/sess* '));
I tried [B]print_r (Glob () Session_save_path (). '/sess* ')); [/b] got the path, I found it, the path is: [0] = = C:/USERS/ADMINI~1/APPDATA/LOCAL/TEMP/SESS_6A29335464A44EA9C497D90B26B176FA
[1] = c:/users/admini~1/appdata/local/temp/session2.000
But I don't know why I can give an explanation? Thank you!!!
You can set Session.save_path in php.ini