Home > php教程 > php手册 > body text

PHP修改session_id示例代码

WBOY
Release: 2016-06-06 20:25:48
Original
1694 people have browsed it

以下是PHP修改session_id的详细代码,希望对大家有所帮助

复制代码 代码如下:


if(isset($_GET["se"])){
$se = $_GET["se"];
}else{
return;
}

if(!empty($se)){

echo("receive se: ".$se.""); //接受的的session为$se
session_id($se); //设置$se位session_id
session_start(); //开启sesseion ,注意不能与上一步对调,打工告成
echo("new session id: ".session_id()."");
echo $_SESSION['h'];
}

Related labels:
php
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 Recommendations
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!