我在本地linux上写了一个PHP网页,可以正常浏览,但是当我反把网页上传到服务器上后只能显示登录页,其他页却无法连接,请问是什么原因,谢谢

解决方案 »

  1.   

    主文件为myphp.php,代码如下:<?php
    $username1=$HTTP_POST_VARS["username"];
    $password1=$HTTP_POST_VARS["password"];
    include("config.php");
    $query="select * from radius.radcheck where Usernanme='$username1'";
    $result=mysql_query($query);
    if($row=mysql_fetch_array($result))
    {
      if($row["password"]==$password1)
         header("Location:index.php");
       
    }else{
     makeform();
    }
    function makeform()
    {
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html;charset=GB2321">
    <title>用户登录</title>
    </head>
    <body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
    <form action="myphp.php" method="post">
    <table cellspacing=0 bordercolordark=#FFFFFF width=60% bordercolorlight=#000000 border=1 align=center cellpadding=2>
      <tr bgcolor=#6b8ba8 style=color:FFFFFF>
        <td width=100% align=center valign=bottom height=19 colspan=3>用户登录</td>
      </tr>
      <tr>
        <td width=30% align=center>用户名:</td>
        <td width=70% align=center><input type=text name=username size=20 maxsize=20></td>
      </tr>
      <tr>
        <td width=30% align=center>密  码:</td>
        <td width=70% align=center><input type=password name=pass size=20 maxsize=20></td>
      </tr>
      <tr>
        <td width=100% align=center colspan=2><input type=submit value=登录></td>
      </tr>
    </table>
    </form>
    </body>
    </html>
    <?php
    }
    ?>