<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title>管理中心</title>
<meta http-equiv=Content-Type content=text/html;charset=gb2312>
</head>
<?php 
session_start();
echo $_SESSION['user'];?><frameset rows="64,*"  frameborder="NO" border="0" framespacing="0">
<frame src="admin_top.php" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
  <frameset cols="200,*"  rows="560,*" id="frame">
<frame src="left.php" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" />
<frame src="right.php" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" />
 
<noframes>
  <body></body>
    </noframes>
</html>
以上代码中, echo $_SESSION['user']; 这一句执行过后,  输出admin ,但下面的程序都不能执行了
也就是说,我在那里 echo 后,,echo 之后的所有语句都不执行了,包括html 这是为什么

解决方案 »

  1.   

    <?php 
    session_start();
    echo $_SESSION['user'];?>
    session_start(); 放到最上边 试试
      

  2.   

    session_start();
    放到整个页面的最前面...
      

  3.   

    <?php 
    echo "Start";
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head><frameset rows="80,*" cols="*" frameborder="no" border="0" framespacing="0">
      <frame src="http://www.baidu.com" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" /></frameset>
    <noframes><body>
    </body>
    </noframes></html>
    <?php
    echo "end";
    ?>如果去掉  echo 语句  能够正常显示  baidu.com 页面 如果不去掉  baidu.com页面不显示,谁能帮我调式下  
      

  4.   

    session_start()前面不能有输出,空格都不可以
      

  5.   

    我这个页面是没有session_start的啊
      

  6.   


    <frameset rows="80,*" cols="*" frameborder="no" border="0" framespacing="0">
      <frame src="http://www.baidu.com" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
    </frameset>
    这个框架不能这样用 它本来就是定好的 分几块 不可能在有其它的来占用它  那就不符号它了所以它的前面有任何输出 它都不执行
      

  7.   

    太狠了
    不能这样玩HTML的frameset
      

  8.   

    怎么楼主不使用IFRAME呢
    IFRAME比FRAMESET灵活很多