$currentSessionID=session_id();session_id($currentSessionID);
简单示例代码:
(HTTP)
<?phpsession_start(); $currentSessionID=session_id(); $_SESSION['username']='Alixixi'; https:cqxftyyj echo '<a href="Alixixi/jquery.php?session="'.$currentSessionID.'">点击这里跳转到HTTPS协议下</a>';
(HTTPS)
<?php$currentSessionID=$_GET['session'];session_id($currentSessionID);session_start();if(!empty($_SESSION['username']))else
有点安全性的问题,因为这样子的话session id的传输是没加密的,别人可以嗅探侦测到,获取这个session id进而获取你的session数据。所以有必要的话可以考虑加密这个id值。
上一篇:如何配置MSSql服务器端与客户端的数据库同步
下一篇:MySql存储过程是带参数的存储过程(动态执行SQL语句)
php数组 php









