为什么在title标签里输出不了PHP程序
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<?php include "connect.php";
$select="select * from news where id='$_GET[id]'";
mysql_query("set names gb2312");
$result=mysql_query($select);
$row=mysql_fetch_array($result);
?>
<title><?php echo "hello";?></title>
</head>别的标签能输出的

解决方案 »

  1.   

    不是输出不了吧 title显示在浏览器的最左角 楼主再看看
      

  2.   

    是不是受这几句的影响?
    <?php include "connect.php";
    $select="select * from news where id='$_GET[id]'";
    mysql_query("set names gb2312");
    $result=mysql_query($select);
    $row=mysql_fetch_array($result);?>
      

  3.   

    可以输出,没问题的啊,最好把<?php include "connect.php";
    $select="select * from news where id='$_GET[id]'";
    mysql_query("set names gb2312");
    $result=mysql_query($select);
    $row=mysql_fetch_array($result);?>放到html的上面