1. $_SESSION["admin"] = "good";
2. php.ini 中 session.save_path 设置不当
2. php.ini 中 session.save_path 设置不当
解决方案 »
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (gbk_chinese_ci,COERCIB
- 谁知道firefox里怎么兼容JS~? 在线等`
- 自定义函数在smarty里面怎么用?
- define('abc',include('abcd.php')); 请问类似这样的定义是什么意思,用意何在??
- smarty技术请教!希忘各位兄弟姐妹多多帮忙
- 急!!!有人知道“Odysseus”这个工具吗?
- PHP配置问题,请高手指点,急急
- PHP 远程调用问题!望高手帮忙教下怎么做!
- filezilla连接远程服务器超时
- 为什么json数据在PHP中加入另外一个echo后会出错?
- 提交单选框问题??急!
- 请教一个关于读取文件的问题
<?php
session_start();
$_SESSION["admin"] = "good";
$sessionName = session_name();
$sessionID = $_GET[$sessionName];
echo session_id($sessionID);
?>
运行到session_id($sessionID);就返回同样错误,(如果注消"\\echo session_id($sessionID);"这行就什么也没返回,没错误信息提示)我已经在php.ini 中的设了
session.save_path = c:/tmp
session.cookie_path = c:/tmp
并在C盘下建立了文件夹C:/tmp我的运行环境是win2000个人版 + php-5.0.5 + apache_2.0.5
php.ini 中文件中,可找到3个设"session.save_path"的地方.从上到下分别是:
;session.save_path = "N;/path"
session.save_path = "N;MODE;C/tmp"
session.save_path = "C:/tmp"
第一个好像是As of PHP 4.0.1用的,我没把分号去掉.我是不是还有什么地方没配好,还是哪个地方出错了,哪个知道的帮帮我啊,谢谢了!
叹!没老师教的新手入门真难,配环境就够我晕了.
看手册的时候仔细点。
很明显session_id 不加参数才是取当前的sessionid的嘛。
--------------
session_id -- Get and/or set the current session id
Description
string session_id ( [string id])
session_id() returns the session id for the current session. If id is specified, it will replace the current session id. session_id() needs to be called before session_start() for that purpose. Depending on the session handler, not all characters are allowed within the session id. For example, the file session handler only allows characters in the range a-z, A-Z and 0-9!
我就是你说的那个地方出错了.
叹!英语不好真难,看手册不知道里面说的是什么意思.