超链接之后的会话变量访问解决办法

WBOY
Release: 2016-06-13 13:15:01
Original
900 people have browsed it

超链接之后的会话变量访问
test2.php:
session_start();

if(!isset($_session['card']))
echo "die";
$_session['card']="123";
?>


测试网页2



echo $_session['card'];
?>

3






test3.php:
session_start();
echo $_session['card'];
?>
为什么超链接之后会话变量就不能访问了?

------解决方案--------------------
$_SESSION['card']="123"; //大写

test3.php:
session_start();
echo $_SESSION['card'];
?>

------解决方案--------------------
哪里不行?test2.php 页面输出 123 了吗?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template