在本机上调试得很好的程序,上传到服务器上就有问题了.
用户可以登录,但不能注销,注销时出现错误:
Warning: session_destroy() [function.session-destroy]: Session object destruction failed in D:\wwwroot\jxsgjy\wwwroot\library\logout.php on line 3
锘?br /> Warning: Cannot modify header information - headers already sent by (output started at D:\wwwroot\jxsgjy\wwwroot\library\logout.php:3) in D:\wwwroot\jxsgjy\wwwroot\library\logout.php on line 5
我的注销程序代码:
<?php
session_start();
session_destroy();
require_once('../mysql_connect.php'); //连接到数据库
header("Location: " . $config_basedir . "index.php");
?>
用户可以登录,但不能注销,注销时出现错误:
Warning: session_destroy() [function.session-destroy]: Session object destruction failed in D:\wwwroot\jxsgjy\wwwroot\library\logout.php on line 3
锘?br /> Warning: Cannot modify header information - headers already sent by (output started at D:\wwwroot\jxsgjy\wwwroot\library\logout.php:3) in D:\wwwroot\jxsgjy\wwwroot\library\logout.php on line 5
我的注销程序代码:
<?php
session_start();
session_destroy();
require_once('../mysql_connect.php'); //连接到数据库
header("Location: " . $config_basedir . "index.php");
?>
解决方案 »
- PHP使用了自己写的中文字符串截取函数,超出一定长度的字符用“……”代替,但是出现下面的错误?
- 敢问大大大们这个链接跳转时 如何实现的
- <form>和<table>的嵌套以及布局问题
- 从mysql取出的文章内容,每段前的两个空格不见了,怎么恢复
- 如何得到进入http://www.xxx.com/index.php这个页面的来路?
- 问一下这样的一个查询系统怎么报价
- 哪有PHPLIB的模板类下载?
- 如何获得其他网段机器的地址和计算机名?多谢!
- 问题贴!!我下了个Appserv组合包,已经整一天了,面临崩溃,还请大神们解救!!
- PHP新手求助
- PHP在windows下环境配置问题
- 如何只取字符串里面的数字 函数 急
不知道session放在哪可以 echo session_save_path( );
unset($_SESSION['sessionname']);
?>
你的这个文件多了个BOM头,使用ue或者editplus去掉就好了。