$_SESSION[$page]该如何写

WBOY
Release: 2016-06-23 13:32:43
Original
1040 people have browsed it

session_start();
$page="pageid".$_GET["page"];
$_SESSION[$page]="dddd";


$_SESSION[$page]该如何写


回复讨论(解决方案)

写什么,不明白

你这样写就是对的了。

session_start();$page="pageid".$_GET["page"];$_SESSION[$page]="dddd";echo $_SESSION[$page];
Copy after login
Copy after login

你这样写就是对的了。

session_start();$page="pageid".$_GET["page"];$_SESSION[$page]="dddd";echo $_SESSION[$page];
Copy after login
Copy after login



不行,无法输出

$_GET["page"] 这个你有值吗,我这边一切正常。

你的写法就是正确的!
你说无法输出,那你的输出代码是如何写的,贴出来看看。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!