喜悦国际村 » Windows/软硬件 » Cannot send session cookie 是什么错误,要怎么解决

页: [1]
wildhoney0532008-4-25 02:22 AM
Cannot send session cookie 是什么错误,要怎么解决

页面显示这个错误:     我在本地虚拟机上测试是好的!平台是:windous 2003 server+apache+php+mysql
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\haolingtong\inc\config.php:1) in D:\haolingtong\inc\config.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\haolingtong\inc\config.php:1) in D:\haolingtong\inc\config.php on line 2


代码如下:
<?php
session_start();                                就是显示这个是第二行错误
$webname = "好灵通后台";
$webtitle= "好灵通分类信息网";
$db_host = "localhost";
$db_user = "haolingtong";
$db_password = "haolingtong2008";
$db_name = "haolingtong";
if ( !@( $conn = @mysql_connect( @$db_host, @$db_user, @$db_password ) ) )
{
    exit( "错误原因 : 数据库连接不上或数据库帐号密码不正确。" );
}
mysql_query( "set names utf-8" );
if ( !mysql_select_db( $db_name ) )
{
    exit( "错误原因 : 数据库不存在".$db_name );
}
?>


查看完整版本: Cannot send session cookie 是什么错误,要怎么解决


Powered by Discuz! Archiver 6.1.0  © 2001-2006 Comsenz Inc.
Processed in 0.006565 second(s), 2 queries