在地址栏直接输入地址可以访问,没有问题。但是只要一刷新页面就变成空白页了。
查看原代码,源代码都在。在html 代码里有一段javascript 程序
<script language="javascript">
if(self!=top){top.location=self.location;}
function sf(){document.login.username.focus();}
</script>。
只要把这段去掉就一切正常。反之则刷新成空白页面了。如果把这段代码放到程序的最后也能一切正常。页面编码设置也设了
<META http-equiv=Content-Type content="text/html; charset=gb2312">
还是不行。<?php
include '../include/mysql_class.php';
$sql = "select websitename from compinfo";
$result = $db->query($sql);
$row = $db->fetch_array($result);
$WebSiteName = $row["websitename"];
$db->close();
?>
<!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">
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="images/css.css" type="text/css"><script language="javascript">
if(self!=top){top.location=self.location;}
function sf(){document.login.username.focus();}
</script>
<title>SiteEngine 登录</title>
</head><body onLoad=sf()>
<table width="100%" align=center height="100%" border="0">
<tr>
<td valign=top bgcolor="#F8F8F8"><br>
<form method="post" action="login.php" name="login">
<table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/Login_1.gif"> </td>
</tr>
<tr>
<td height="77" align="center" background="images/Login_2.gif"><font color=#ffffff><?php echo $WebSiteName ?></font></td>
</tr>
<tr>
<td height="148" align="center" background="images/Login_3.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30%"> </td>
<td width="70%"> </td>
</tr>
<tr>
<td align="right">管理用户</td>
<td align="left"><input type="text" name="username" size="16" onMouseOver ="this.style.backgroundColor='#879BD8'" onMouseOut ="this.style.backgroundColor='#f8f8f8'"></td>
</tr>
<tr>
<td align="right">管理密码</td>
<td align="left"><input type="password" name="password" size="16" onMouseOver ="this.style.backgroundColor='#879BD8'" onMouseOut ="this.style.backgroundColor='#f8f8f8'"></td>
</tr>
<tr>
<td height="20" align="right">输入验证</td>
<td height="20" align="left"> <input name="check_image" type="text" id="check_image" size="4" maxlength="4" /> <img src="../code.php" alt="看不清,请点刷新!" width="50" height="20" align="middle" id="code" style="cursor:hand;" onClick="document.getElementById('code').src='../code.php?'+Math.random();">
<a onClick="document.getElementById('code').src='../code.php?'+Math.random();" style="cursor:hand;" >刷新</a> </td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="submit" class="Textborder" value="确定" onmouseover ="this.style.backgroundColor='#879BD8'" onmouseout ="this.style.backgroundColor='#cccccc'" />
<input type="reset" name="reset" class="Textborder" value="取消" onmouseover ="this.style.backgroundColor='#879BD8'" onmouseout ="this.style.backgroundColor='#cccccc'" /></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</body>
查看原代码,源代码都在。在html 代码里有一段javascript 程序
<script language="javascript">
if(self!=top){top.location=self.location;}
function sf(){document.login.username.focus();}
</script>。
只要把这段去掉就一切正常。反之则刷新成空白页面了。如果把这段代码放到程序的最后也能一切正常。页面编码设置也设了
<META http-equiv=Content-Type content="text/html; charset=gb2312">
还是不行。<?php
include '../include/mysql_class.php';
$sql = "select websitename from compinfo";
$result = $db->query($sql);
$row = $db->fetch_array($result);
$WebSiteName = $row["websitename"];
$db->close();
?>
<!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">
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="images/css.css" type="text/css"><script language="javascript">
if(self!=top){top.location=self.location;}
function sf(){document.login.username.focus();}
</script>
<title>SiteEngine 登录</title>
</head><body onLoad=sf()>
<table width="100%" align=center height="100%" border="0">
<tr>
<td valign=top bgcolor="#F8F8F8"><br>
<form method="post" action="login.php" name="login">
<table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/Login_1.gif"> </td>
</tr>
<tr>
<td height="77" align="center" background="images/Login_2.gif"><font color=#ffffff><?php echo $WebSiteName ?></font></td>
</tr>
<tr>
<td height="148" align="center" background="images/Login_3.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30%"> </td>
<td width="70%"> </td>
</tr>
<tr>
<td align="right">管理用户</td>
<td align="left"><input type="text" name="username" size="16" onMouseOver ="this.style.backgroundColor='#879BD8'" onMouseOut ="this.style.backgroundColor='#f8f8f8'"></td>
</tr>
<tr>
<td align="right">管理密码</td>
<td align="left"><input type="password" name="password" size="16" onMouseOver ="this.style.backgroundColor='#879BD8'" onMouseOut ="this.style.backgroundColor='#f8f8f8'"></td>
</tr>
<tr>
<td height="20" align="right">输入验证</td>
<td height="20" align="left"> <input name="check_image" type="text" id="check_image" size="4" maxlength="4" /> <img src="../code.php" alt="看不清,请点刷新!" width="50" height="20" align="middle" id="code" style="cursor:hand;" onClick="document.getElementById('code').src='../code.php?'+Math.random();">
<a onClick="document.getElementById('code').src='../code.php?'+Math.random();" style="cursor:hand;" >刷新</a> </td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="submit" class="Textborder" value="确定" onmouseover ="this.style.backgroundColor='#879BD8'" onmouseout ="this.style.backgroundColor='#cccccc'" />
<input type="reset" name="reset" class="Textborder" value="取消" onmouseover ="this.style.backgroundColor='#879BD8'" onmouseout ="this.style.backgroundColor='#cccccc'" /></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</body>
很明显这有问题,自己调试一下!
uedit下去掉bom试下
能详细说一下吗。 uedit 是什么。bom又是什么