错误提示   
  Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /test/index.php:8) in /test/inc.php on line 2其中index.php:8 这个:8什么意思?inc.php 代码如下:
<head>
<META HTTP-EQUIV=REFRESH CONTENT='0;URL=http://localhost/test/inc.php?login=1'>
</head><?php 
    session_start(); index.php 头几行代码如下:<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试</title><link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<? 
include "../../../inc.php"; 
?>我是新手刚学php,看不懂提示,请教大家哪里有session_start输出错误?

解决方案 »

  1.   

    PHP.ini
    里面有个session 什么的 设为 on 应该就行了 
      

  2.   

    <head> 
    <META HTTP-EQUIV=REFRESH CONTENT='0;URL=http://localhost/test/inc.php?login=1'> 
    </head> 
    <?php 
        session_start(); session_start 前不允许有输出
    红色部分不是输出吗
      

  3.   

    还是会报错其中index.php:8 这个:8什么意思?
      

  4.   


    在index.php文件代码中第八行
      

  5.   

    把<head> 
    <META HTTP-EQUIV=REFRESH CONTENT='0;URL=http://localhost/test/inc.php?login=1'> 
    </head>去掉还是报输出错误
      

  6.   

    session_start()放最上面去
    或者把把session_start()去掉再把php.ini里的session.autostart=1
      

  7.   

    把<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>测试 </title> <link href="css/css.css" rel="stylesheet" type="text/css"> 
    </head> 
    这段去掉就可以了,但是title标签去掉就没法编辑了啊,网页标题是空的
      

  8.   

    把session_start放到页面的最前面。
    <?php
     session_start();
    ?>
    content
      

  9.   

    已经放最前面了,把前面一些标签去掉好了,但是title标签去掉标题就没法编辑了啊,网页标题是空的
      

  10.   

    你去title干嘛?只需将session_start(); 前移即可。
      

  11.   

    inc.php 里面session_start();已经放最前面了但是index.php里面要将
    <? 
    include "../../../inc.php"; 
    ?> 
    这段放不了最前面,每次保存都自动跳到标签后面,标签留着就报session输出错误,去掉就没报错,但是去掉的话title就没法编辑了
      

  12.   


    source1:
        //验证登陆
    if (CheckLogin($_POST["uname"],$_POST["pwd"])){

    //成功登陆
    $_SESSION["T_uname"] = $_POST["uname"];
    echo "<script>alert('登陆成功!".$dt."');</script>";

    }else {

    //登陆失败
    echo "<script>alert('用户名密码错误!".$dt."');window.location.href='index.php'</script>";

    }
    source2://判断会话信息是否为空
    if ($_SESSION["T_uname"] == null){
         

    echo "<script type='text/javascript'>alert('对不起,请先登陆!'); window.location.href = 'Index.php';</script>";

    }这个代码 哪里有问题啊 ,我晕 跳转页面后Session就丢失了!!!等
      

  13.   

    晕死了,换个dreamweaver编辑器就好了,frontpage就不行,大家辛苦了