The 23rd chapter of PHP and MySQL Web development uses session control in PHP, which is stuck in a puzzle ~
Session_Start ();
$_session_[' sess_var ' = "Hello world";
echo $_session[' Sess_var '];
Echo ' The content of $_session[\ ' sess_var\ ' is '. $_session[' Sess_var ']. '
';
?>
Operation Result:
The content of $_session[' Sess_var ' is
Why $_session_[' Sess_var ' did not print out, is the SESSION already invalid?
------to solve the idea----------------------
You are
This assigns the value $_session_[' sess_var '] = "Hello World";
This uses echo $_session[' Sess_var '];
Of
Do you think $_session_ and $_session are a thing?
PHP should be checked for all errors (error_reporting = E_all in php.ini), so PHP will tell you what's wrong.
------to solve the idea----------------------
Session_Start ();
$_session_[' sess_var ' = "Hello world";
Var_dump ($_session);