是什么样的代码??
<body></body>
之间的是html代码,可以在中间输入php代码的,就是要<??>来包函

解决方案 »

  1.   

    就是html语言没能作用啊,php代码确作用了,用dw能看到html下的设计,可是,运行却看不到
      

  2.   

    <?
    #########################################################
    ##  技术支持:[email protected]                 #
    ##  设计日期:2003/09/08                                #
    ##  空间软件工作室                                      #
    ##  文章管理系统(BAS)1.2 Build 0422                 #
    #########################################################
    include "config.php";
    $db=mysql_connect($DBhost,$DBuser,$DBpass) or die("无法联接到数据库");
    $sdb=mysql_select_db($DBname);
    session_start();
    if($HTTP_SESSION_VARS['login_admin']!="passed"){
      header("Location: index.php"); 

    }
    if($HTTP_SESSION_VARS['hykffb']=="1")
    {
    ?>
    <html><head><link rel="stylesheet" href="cp.css">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
    <meta http-equiv="Content-Language" content="zh-CN"> <title>空间文章管理系统--空间软件工作室</title>
    </head>
    <script language="javascript">
    <!--
    function CheckForm()
    {
    document.form1.content.value=document.form1.doc_html.value;
        
    return true
    }
    //-->
    </script><?php$fbdate=getdate(time());
    $fbdate2=$fbdate['year']."年".$fbdate['mon']."月".$fbdate['mday']."日";
    echo "<body leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">";
    //<body link="#003366" vlink="#003366" leftmargin="20" bgcolor="#D6EFF7">
    ?>
    <div align="left">
      <table border="0" width="550">
        <tr>
          <td width="60">  当前栏目:</td>
          <td width="110" align="left"> 文章管理>>信息发布 </td>
          <td width="87">
          </td>
          <td width="87" align="right">
          </td>
          <td width="81" align="right">
          </td>
          <td width="81" align="right">
            
            
            </td>
        </tr>
      
        
        <tr>
          <td width="542" colspan="6">
    <form action="upload.php" method="POST" name="form1" onsubmit="return CheckForm()">
    <br>
              <p>信息标题: 
                <input name="bt" type="text" size="63" value="">
                &nbsp; </p>
              <p>信息内容:&nbsp;<br>
                <object data=editor.htm type=text/x-scriptlet name="myeditor" width=565 
            height=320 id=doc_html style="LEFT: 0px; TOP: 0px"  VIEWASTEXT>
                </object>
                <input type="hidden" name="content" value="" >
                <input type="hidden" name="MM_insert" value="form1">
              </p>  
     <p>图片数量:
        <select name="imagecount" size="1" id="imagecount">
    <? 
    for($i=0;$i<=20;$i++)
    {
    ?>
            <option value="<?=$i;?>"><?=$i;?></option>
        <?
    }
    ?>
        </select>&nbsp;&nbsp;&nbsp;&nbsp;
           
      信息级别:
                <select name="jb" size="1" id="jb">
    <?php
                
             $result = mysql_query("select * from xxjb order by jbdm ",$db);
             while ($row = mysql_fetch_array($result))
     {
     ?>
      <option value=<?=$row["jbdm"];?> ><?=$row["jbdm"];?>级</option>
      <?
      }
     ?>
                 </select>
     &nbsp;&nbsp;&nbsp;&nbsp;
           
         信息分类:
                <select name="xxfl" size="1" id="xxfl">
    <?php
                 
     $rs = mysql_query("select * from hy_table where xh='".$HTTP_SESSION_VARS['hyzh']."'",$db);
     $row1 = mysql_fetch_array($rs);
     if($row1)
     {
     $qx1=$row1[qx];
             $result = mysql_query("select * from xxlb_table order by xxflh ",$db);
             while ($row = mysql_fetch_array($result))
     {
     if (strchr($qx1,$row[xxflh].","))
     {
     ?>
      <option value=<?=$row["xxflh"];?> ><?=$row["xxflh"];?><?=$row["xxflm"];?></option>
      <?
      }
      }
      }
     ?>
                 </select>
              <p> 
        信息备注:<textarea name="bz" cols="82" rows="4" id="bz"></textarea>
              </p>
              <p>发布日期:
                <?=$fbdate2;?>
                &nbsp;&nbsp; 发布单位:<?=$HTTP_SESSION_VARS['dwmc'];?>&nbsp;&nbsp;<?=$HTTP_SESSION_VARS['bmmc'];?>
                <?php
      //Response.Write session("bm")
      ?>
          
              </p>
      <?php
     // if ($HTTP_SESSION_VARS['shdj']==1)   // || $HTTP_SESSION_VARS['shdj']==2
     // {
     //  echo "<p>审核:<input type=checkbox name='check1' value='ON'> * 如要审核此记录请选中此框。";
     //  }
     
      ?>
      
      <p><input type="submit" value="提交" name="submit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      <input type="reset" value="全部重写" name="reset"></p>
    </form>
    </td></tr></table>
    </div></body>
    </html>
    <?
    }
    else
    {
    /*
    ?>
    <script language="javascript">
    <!--
    alert("用户无发布权限");
    //-->
    </script>
    <?
    */
    header("Location: main_r.php"); 
    }
    ?>
    就是老回到main_r.php去,html完全没显示
      

  3.   

    应该是的你的逻辑判断不对,所以执行了header("Location: main_r.php"); 
    就转换到了main_r.php去,html完全没显示
      

  4.   

    把你的代码:
    <script language="javascript">
    <!--
    alert("用户无发布权限");
    //-->
    </script>
    <?
    */
    header("Location: main_r.php"); 
    }
    ?>
    移到上面的那个
    else{
    *
    }
    里面就可以了