Home  >  Article  >  Backend Development  >  session_id()的施用

session_id()的施用

WBOY
WBOYOriginal
2016-06-13 13:21:51888browse

session_id()的使用

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
<?php ob_start('ob_gzhandler');
    
    
    session_save_path('2;D:/sessionFile/sessionFile');
    @session_start();
    
    
    echo 'Your session identification number is ' . session_id("967d992a949114ee9832f1c11c");
?>



为什么在session_id()中输入一个参数却不能替代当前运行的SID?与没有设置参数的效果一样。。

------解决方案--------------------
设置 sessionid 要在 session_start(); 之前
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