session_start()前面有输出了,
把这句放到页面的最前面

解决方案 »

  1.   

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /data/home/zh4031/htdocs/index/inc/setpage.php:109) in /data/home/zh4031/htdocs/index/accounts/Login.php on line 3但是我在自己的电脑上又没问题
      

  2.   

    同意ice_berg16(寻梦的稻草人) 
    代码贴出来
      

  3.   

    我现在提交成功了,但跳转到另外一个页面它就没有显示。
    我知道SESSION现在已经成功提交过去了。
      

  4.   

    <?
    session_start();
    include("../inc/inc.php");
    if(!$_SESSION[name]) {
    echo JavaFun("alert('尚未登陆');window.location='./Login.php';");
    exit();
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="../inc/style.css" rel="stylesheet" type="text/css">
    <title>管理员后台</title>
    </head><frameset rows="50,*" frameborder="NO" border="0" framespacing="0">
      <frame src="UntitledFrame-18.php" name="topFrame" scrolling="NO" noresize>
      <frameset rows="*" cols="250,*" framespacing="0" frameborder="yes" border="0">
    <frame src="UntitledFrame-19.php" name="leftFrame" scrolling="NO" noresize>
    <frame src="Untitled-7.htm" name="mainFrame">
    </frameset>
    </frameset>
    <noframes><body>
    </body></noframes>
    </html>
    这是我跳转的页面,是一个框架
      

  5.   

    /data/home/zh4031/htdocs/index/inc/setpage.php:109
    即setpage.php的第109行应该是程序已结束了吧,那你应该是一空行。当你不是用文本方式上传程序文件时,windows下的回车符是不会自动被去掉的。而<?php ?>标记以外的内容都被视为输出,当然回车符也不例外!
    ....
    ?>| <--编辑文件时宜将最后一行的光标停在这里
    | <--而不是在这里
      

  6.   

    我遇到过类似的问题,或许对你有帮助,有些编辑器,比如UE,有windows或者unix文件的转换功能,两种文件的字符编码可能有差别吧,所以,如果存储错误,会出现这种情况,但是查看文件时候却看不到什么无关字符