VPS侦探论坛

 找回密码
 注册
查看: 8055|回复: 2

lnmp安装成功,但是网页却显示这样

[复制链接]
发表于 2011-2-26 01:47:57 | 显示全部楼层 |阅读模式

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/wwwroot/hy/config.php on line 172
Update ka_kithe Set kitm=0,kizt=0,kizm=0,kizm6=0,kigg=0,kiws=0,kilm=0,kisx=0,kibb=0,zfb=0 where id=


我的是php+mysql网站

在win2003的环境下是完全正常的,麻烦老大帮忙,可以吗?

如果确实很难,我可以支付人民币。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-2-26 01:49:37 | 显示全部楼层


这是我的index.php代码:
<?php
require_once 'conjunction.php';
require_once 'config.php';
if (ka_config("opwww")==1){
echo "<script>alert('对不起,系统维护中!');top.location.href='op.php';</script>";
exit;}

$name = NULL;
$i = 0;
for ( ;        $i < 1;        ++$i        )
{
                $j = 0;
                for ( ;        $j < 4;        ++$j        )
                {
                                srand( ( double )microtime( ) * 1000000 );
                                $randname = rand( !$j ? 1 : 0, 9 );
                                $name .= $randname;
                }
}
session_start( );
$_SESSION['yzcode'] = $name;
//前台登陆验证
if (submitcheck('islogin') == 'yes' && empty($admin_info2)) {
       
        $user = addslashes(trim($user));
        $pass = trim($pass);
        $ycode=$_POST['ycode'];
        $code=$_POST['code'];

        if(empty($user) || empty($pass) || empty($code)){
      
  echo "<script>alert('用户名或密码不能为空,请反回重新输入!');window.history.go(-1);</script>";
  exit;
    }
        if($ycode!=$code){
  echo "<script>alert('对不起,输入验证码有错!');window.history.go(-1);</script>";
  exit;
    }


    $pass = md5($pass);

       
         $ip=$_SERVER["REMOTE_ADDR"];
       
        $resultb2=mysql_query("select * from tj where username='$user' and ip= '".$ip."'");
        $rowb2=mysql_fetch_array($resultb2);
        if ($rowb2!=""){
                mysql_query("Delete from tj where username='$user' and ip='".$ip."'");
                $exe=mysql_query($sql) or  die("数据库修改出错");
        }

       
        $result=mysql_query("select * from ka_mem where kauser='$user' and kapassword='$pass'");
$row=mysql_fetch_array($result);
        $pass1=$row['kapassword'];
        if ($pass1!=$pass ){
        echo "<script>alert('您输入的帐号或密码错误,请重新输入!');window.history.go(-1);</script>";
        exit;
        }
       
        $resultb=mysql_query("select * from tj where username='$user' ");
        $rowb=mysql_fetch_array($resultb);
        if ($rowb!=""){
        echo "<script>alert('对不起,该账号已登录过,请稍候重试!');window.history.go(-1);</script>";
        exit;
        }

        $text=date("Y-m-d H:i:s");
$sql="update ka_mem set slogin='".$row['slogin']."',sip='".$row['sip']."',zlogin='".$text."',zip='".$ip."',look=look+1 where kauser='".$user."'";
$exe=mysql_query($sql) or die ($sql);       

        $_SESSION['username']= $user;
        $sql="INSERT INTO  tj set addate='".$text."',adddate='".$text."',username='".$user."',zt='1',ip='".$ip."'";
        $exe=mysql_query($sql) or  die("数据库修改出错");
       
        if($row['look']<=0){
                echo "<script>alert('第一次登陆,请重新设置密码!');top.location.href='?do=pass_huiyuan_f1';</script>";
                exit;
        }
        if ($row['stat']==1){
echo "<script>alert('对不起,该用户已被禁止!');top.location.href='?do=logout';</script>";
exit;}
  
       
        echo "<meta http-equiv=refresh content=\"0;URL=\">";exit;
}
?>
<HTML>
<HEAD>
<title><?=ka_config(1)?>-<?=ka_config(2)?></title>
<body oncontextmenu="return false"   onselect="document.selection.empty()" oncopy="document.selection.empty()">
<style type="text/css">
<!--
body {
        margin-left: 0px;
        margin-top: 0px;
        margin-right: 0px;
        margin-bottom: 0px;
        background-color: #FFFFFF;
}
.dndn {
        BORDER-RIGHT: #d6d3ce 0px outset; BORDER-TOP: #d6d3ce 0px outset; FONT-SIZE: 9pt; BACKGROUND: #d6d3ce; BORDER-LEFT: #d6d3ce 0px outset; BORDER-BOTTOM: #d6d3ce 0px outset
}
body,td,th {
        font-size: 12px;
        color: #333333;
}
.b-03 {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #040177; FONT-STYLE: normal; FONT-FAMILY: "细明体", "新细明体"
}
.b-04 {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: "细明体", "新细明体"
}
.style2 {FONT-SIZE: 12px; FONT-STYLE: normal; FONT-FAMILY: "细明体", "新细明体"
}
.style3 {COLOR: #000000
}
-->
</style>

<?
//已登陆
if($_SESSION['username']){
    if (in_array($do, array('left','t', 'logout', 'top','kaijiangjieguo','l','list','h','k_tm','n1','k_tansave','ds','k_zt','k_zm','k_wx','k_ws','k_bb','k_sx','guiju','k_sxp','k_sx4','k_sx5','k_sx6','k_gg','k_lm','n2','k_tansx','k_ggsave','server','k_tangg','k_lm','k_lmsave','k_tanlm','kq','serverf','n55','n5','rake_bb','rake_ws','look','pz_tm','server_tm','pz_zm','server_zm','pz_zt','server_zt','pz_zm6','server_zm6','pz_sx','server_sx','pz_dd','server_dd','pz_lm','server_lm','pz_bb','server_bb','pz_ws','server_ws','pz_gg','server_gg','x1','x2','x3','x4','x5','re_pb','re_all','re_guan','re_zong','re_dai','re_mem','ka_del','ka_xxx','kawin','xt_abcd','xt_stds','xt_ds','kaijiangriqi','xt_copy','xt_bak','pz_wx','server_wx','huiyuanzixun','ziedit','k_sx2','k_sx3','k_zm6','pass_huiyuan','k_wb','n9','k_tann9','k_sxl','n6','pass_huiyuan_f1','k_tansxl','k_wsl','n7','spjieguo','k_tanwsl','k_sb','n8','k_tann8'))) {
       
        if ($do!="logout" and $do!="t" ){
        require_once 'login.php';}
                 require_once $do .'.php';
        exit;
    }
?>

<body scroll="no" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellspacing="0" border="0" cellpadding="0" height="100%">
  <tr>
    <td valign="top" height="66px">
       
        <iframe id=frmRight style="Z-INDEX: 1; VISIBILITY: inherit; WIDTH: 100%; HEIGHT: 66" name=right src="?do=t" frameborder=0></iframe>
       
        </td></tr><tr><td valign="top">
<table id=tblTotal height="100%" cellspacing=0 cellpadding=0 width="100%" border=0 name="tblTotal">
<tbody> <tr><td id=frmMenu valign=center noWrap align=middle name="frmMenu">
       
        <iframe id=k_meml style="Z-INDEX: 2; VISIBILITY: inherit; WIDTH: 215px; HEIGHT: 100%" name=k_meml src="?do=left" frameborder=0 ></iframe>

</td><td width="100%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr><td height="100%" valign="top">
                       
        <iframe id=k_memr style="Z-INDEX: 1; VISIBILITY: inherit; WIDTH: 100%; HEIGHT: 100%" name=k_memr src="?do=guiju" frameborder=0></iframe>
                               
                                </td>
              </tr>
            </table>           </td>
        </tr>
        </tbody>
      </table>
    </td>
  </tr>
</table>

<?php
}
else {
?>

</HEAD>
<body scroll=no>
<SCRIPT language=JavaScript>
function CheckForm()
{
if(document.form1.user.value=="")
{
alert("请输入用户");
return false;
}
if(document.form1.pass.value=="")
{
alert("请输入密码");
return false;
}
if(document.form1.code.value=="")
{
alert("请输入以验证码");
return false;
}

return true;
}
</SCRIPT>

<?php
require_once 'ss.php';
}
?>
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-2-26 09:05:44 | 显示全部楼层

回复 1# 的帖子


可能是数据库连接信息或者sql操作语句上有问题。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-19 09:00 , Processed in 0.028075 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表