a.php
<?php
session_start();
$username = 'session';
$_SESSION['usename'] = $username ;
?>
b.php
<?php
session_start();
echo $_SESSION['username'];
?>
错误提示
( ! ) Notice: Undefined index: username in G:\Wamp\wamp\www\session\b.php on line 3 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0000 | 128400 | {main}( ) | ...\b.php:0 |
Undefined index:username 。
我这就样都取不到值?黑人问号??首先浏览器没有禁用cookie,其次我的php.i
session.use_cookies = 1 也是改了的