当前位置:Gxlcms > PHP教程 > $_SESSION为啥不让打

$_SESSION为啥不让打

时间:2021-07-01 10:21:17 帮助过:23人阅读

$_SESSION为什么不让打
我想打印出$_SEEION这个数组中的结构,但是返回的却是Notice: Undefined variable: _SESSION in D:\wamp\www\test.php on line 3 记得以前打印$_SERVER很容易就出来,不知这个是为什么
  1. <!--?php<br /-->
  2. echo '<pre class="brush:php;toolbar:false layui-box layui-code-view layui-code-notepad"><ol class="layui-code-ol"><li>';<br></li><li> print_r($_SESSION);<br></li><li> echo '</li></ol></pre>';<br>
  3. ?>

分享到: 更多


------解决方案--------------------
请先session_start()

人气教程排行