Yesterday, using sessions at 4.03

zhaozj2021-02-16  91

Code is like this

$ _SESSION ['USER_NAME'] = $ row ['user_name']; $ _SESSION ['LASTEST_ENTER_TIME'] = $ ROW ['Lastest_Enter_time']; $ _SESSION ['grade'] = $ row ['grade'];

My own machine, PHP 4.33 is affirmation, everything is willing, after closing the browser, session failed

Upload 51 space, session, how did he not?

Session variable: $ _ session php4.10 can you use it?

Well, print_r ($ globas); look

Array ([Home] => / [PATH] => / sbin: / bin: / usr / sbin: / usr / bin: / usr / local / sbin [phpsessid] => 04DE47ACB7EDE316952818776BA280CD [Document_Root] => / local / www / data [HTTP_ACCEPT] => image / gif, image / x-xbitmap, image / jpeg, image / pjpeg, application / msword, application / vnd.ms-powerpoint, application / x-shockwave-flash, * / * [HTTP_ACCEPT_ENCODING ] => gzip, deflate [HTTP_ACCEPT_LANGUAGE] => zh-cn [HTTP_CONNECTION] => Keep-Alive [HTTP_COOKIE] => PHPSESSID = 04de47acb7ede316952818776ba280cd [HTTP_HOST] => etongxue.com [HTTP_USER_AGENT] => Mozilla / 4.0 (compatible; MSIE 6.0; Windows NT 5.1) [Remote_addr] => 61.183.234.175 [Remote_Port] => 3061 [script_filename] => / Daletxue.com/test1.php [script_uri] => http://etongxue.com/test1. php [SCRIPT_URL] => /test1.php [SERVER_ADDR] => 218.30.29.73 [SERVER_ADMIN] => webmaster@51.net [SERVER_NAME] => etongxue.com [SERVER_PORT] => 80 [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache [Gateway_Interface] => CGI / 1.1 [Server_Protocol] => http / 1.1 [request_method] => g ET [query_string] => [request_uri] => /test1.php [script_name] => /test1.php [PATH_TRANSLATED] => / Da-Etongxue.com/test1.php [php_self] => /test1.php [argv ] => Array () [ARGC] => 0 [http_post_vars] => Array () [_post] => array () [http_get_vars] => array () [_get] => array () [http_cookie_vars] => array ([Phpsessid] => 04DE47ACB7EDE316952818776BA280CD) [_cookie] => array ([phpsessid] => 04de47acb7ede316952818776ba280cd) [http_server_vars] =>

Array ([Document_Root] => / local / www / data [http_accept] => image / gif, image / x-xbitmap, image / jpeg, image / pjpeg, application / msword, Application / VND.MS-PowerPoint, Application / x-shockwave-flash, * / * [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_ACCEPT_LANGUAGE] => zh-cn [HTTP_CONNECTION] => Keep-Alive [HTTP_COOKIE] => PHPSESSID = 04de47acb7ede316952818776ba280cd [HTTP_HOST] => etongxue.com [ HTTP_USER_AGENT] => mozilla / 4.0 (compatible; msie 6.0; windows nt 5.1) [PATH] => / sbin: / bin: / usr / sbin: / usr / bin: / usr / local / sbin [remote_addr] => 61.183 .234.175 [transote_port] => 3061 [script_filename] => / YuTongxue.com/test1.php [script_uri] => http://etongxue.com/test1.php [script_url] => /test1.php [server_addr ] => 218.30.29.73 [server_admin] => Webmaster@51.net [server_name] => EtonGxue.com [server_port] => 80 [server_signature] => [server_software] => apache [Gateway_Interface] => CGI / 1.1 [ Server_Protocol] => http / 1.1 [request_method] => get [query_string] => [request_uri] => /test1.php [script_nam E] => /test1.php [Path_Translated] => / Daletxue.com/test1.php [php_self] => /TEST1.PHP [Argv] => array () [argc] => 0) [_server] => Array ([Document_Root] => / local / www / data [http_accept] => image / gif, image / x-xbitmap, image / jpeg, image / pjpeg, application / msword, Application / VND.MS-PowerPoint, Application / X-ShockWave-Flash, * / * [http_accept_encoding] => gzip, deflate [http_accept_language] => zh-cn [http_connection] => keep-alive [http_cookie] => phpsessid =

04de47acb7ede316952818776ba280cd [HTTP_HOST] => etongxue.com [HTTP_USER_AGENT] => Mozilla / 4.0 (compatible; MSIE 6.0; Windows NT 5.1) [PATH] => / sbin: / bin: / usr / sbin: / usr / bin: / usr / local / sbin [remote_addr] => 61.183.234.175 [remote_port] => 3061 [script_filename] => / YuTongxue.com/test1.php [script_uri] => http://etongxue.com/test1.php [ SCRIPT_URL] => /test1.php [SERVER_ADDR] => 218.30.29.73 [SERVER_ADMIN] => webmaster@51.net [SERVER_NAME] => etongxue.com [SERVER_PORT] => 80 [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache [GATEWAY_INTERFACE] => CGI / 1.1 [SERVER_PROTOCOL] => HTTP / 1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /test1.php [SCRIPT_NAME] => /test1.php [PATH_TRANSLATED] = > / uletxue.com/test1.php [php_self] => /test1.php [argv] => array () [argc] => 0) [http_env_vars] => array ([home] => / [PATH ] => / sbin: / bin: / usr / sbin: / usr / bin: / usr / local / sbin) [_ENV] => Array ([Home] => / [PATH] => / sbin: / bin: / usr / sbin: / usr / bin: / usr / local / sbin) [http_post_files] => a rray () [_FILES] => Array () [_REQUEST] => Array ([PHPSESSID] => 04de47acb7ede316952818776ba280cd) [GLOBALS] => Array * RECURSION * [HTTP_SESSION_VARS] => Array () [_SESSION] => Array () Not, very normal, can be used [_SESSION] => array is the question of registration session, use a session_regiester ();

Session_register ("user_name"); session_register ("lastest_enter_time"); session_register ("grade");

Session can be closed normally ~~

Description Low version PHP must be session_register (); or $ http_session_vars directly registering sessionSession to use

转载请注明原文地址:https://www.9cbs.com/read-12984.html

New Post(0)