Home >Backend Development >PHP Tutorial >请问session输出有关问题

请问session输出有关问题

WBOY
WBOYOriginal
2016-06-13 10:06:39875browse

请教session输出问题
index.php文件:

session_start();
$_session["login"]="true";
echo $_session["login"];
?>
可以正常显示true

同一目录下index1.php文件:


session_start();
echo $_session["login"];
?>
不能正常显示

求高人!



------解决方案--------------------
大写!
php 的变量时大小写铭感的

$_SESSION["login"]
------解决方案--------------------
up 大写即可

Statement:
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