高手帮忙!php页面display_errors = On开启后仍然空白问题

Lmir 2005-04-23 11:18:02
服务器转移后出现问题,转移时文件都拷贝过来的,应该没有丢失
php培植都是按照一个标准配置文档配的:
拷贝文件,添加应用程序扩展,iis配置添加映射等

管理员登陆后,页面空白,用户名和密码都能鉴别是否错,空白文档的title能显示出来
但是body为空白,查看源代码也没有内容,让我无从下手,欲哭无泪啊,请高手指点迷津

登录页面,login.php:
<? session_start(); ?>
<?php include("func.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>管理员登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>
<?
$yes=$_REQUEST['yes'];
if ($yes=="yes")
{
$username=$_REQUEST['username'];
$userpwd=$_REQUEST['userpwd'];

if(isuser($username,$userpwd)==1)
{
$usertype=getusertype($username);

//登记当前用户的用户名和级别
session_register("username");
session_register("usertype");
//setcookie ($cookie_username,$username);
//$cookie_testname=$_COOKIE["cookie_username"];
//echo "cookie_testname:".$cookie_testname;
//echo "do it!";
//echo $_SESSION["username"];
?>
<script language="javascript">
window.location.href="main.php"
</script>
<?
}
else
{
if(isuser($username,$userpwd)==0)
{
echo "密码不正确!";
}
else
{
echo "该用户不存在!";
}
}
}
else
{
?>
<form name="form1" method="post" action="">
<table width="500" align="center" cellpadding="1" cellspacing="1" bgcolor="#0099FF">
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="center" class="pt12">管理员登录</div></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="center" class="pt9">用户名:
<input name="username" type="text" id="username" size="16">
</div></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="center" class="pt9">口 令:
<input name="userpwd" type="password" id="userpwd" size="16">
</div></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="center">
<input name="Submit" type="submit" class="pt9" value="确 定">
 
<input name="Submit2" type="reset" class="pt9" value="取 消">
<input name="yes" type="hidden" id="yes" value="yes">
</div></td>
</tr>
</table>
</form>
<?
}
?>
</body>
</html>
...全文
457 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lmir 2005-04-23
  • 打赏
  • 举报
回复
顶一下
Lmir 2005-04-23
  • 打赏
  • 举报
回复
原来没有设置,但是设置好了还是一样的
allkill 2005-04-23
  • 打赏
  • 举报
回复
看看session的目录设置了没有,默认是/tmp
检查一下这个目录是否存在。
Lmir 2005-04-23
  • 打赏
  • 举报
回复
<?
$conn=getconn();
$sqlstr="select * from tbmedia order by id desc";
//echo $sqlstr;
$result=getresult($conn,$sqlstr);
while($row = mysql_fetch_array($result))
{
?>
<tr class="pt9">
<td width="30" height="20" bgcolor="#FFFFFF"><div align="center"><?=$row["id"]?></div></td>
<td height="20" bgcolor="#FFFFFF"> 
<a href="viewmedia.php?id=<?=$row["id"]?>"><?=$row["title"]?>
</a> </td>
<td width="30" height="20" bgcolor="#FFFFFF"><div align="center"><img src="images/<?=$row["filetype"]?>.gif" alt="<?=$row["filetype"]?>" width="18" height="18">
</div></td>
<td width="30" height="20" bgcolor="#FFFFFF"><div align="center"><a href="change.php?id=<?=$row["id"]?>"><img src="images/change.gif" width="18" height="18" border="0"></a></div></td>
<td width="30" height="20" bgcolor="#FFFFFF"><div align="center"><a href="filedelete.php?id=<?=$row["id"]?>"><img src="images/delete.gif" width="18" height="18" border="0"></a></div></td>
</tr>
<?
}
closeconn($conn);
?>
</table>
<table width="99%" border="0">
<tr>
<td> <form action="addfile.php" method="post" name="form" id="form">
<table width="100%" border="0">
<tr>
<td><table width="75%" border="0">
<tr>
<td colspan="2"><div align="center" class="pt9">添加多媒体文件</div></td>
</tr>
<tr>
<td width="15%" class="pt9">标题:</td>
<td width="85%"><input name="filetitle" type="text" class="pt9" id="filetitle2" size="40"></td>
</tr>
<tr>
<td class="pt9">URL:</td>
<td><input name="url" type="text" id="url" value="<?=$defaulturl?>" size="50"></td>
</tr>
<tr>
<td class="pt9">格式:</td>
<td><select name="filetype" size="1" id="filetype">
<option value="WMV" selected>WMV</option>
<option value="AVI">AVI</option>
<option value="RM">RM</option>
</select></td>
</tr>
<tr>
<td class="pt9">类别:
</td>
<td>
<?
$conn=getconn();
$sqlstr="select * from tbclass order by id";
//echo $sqlstr;
$result=getresult($conn,$sqlstr);
?>
<select name="classid" size="1" id="classid">
<?
while($row = mysql_fetch_array($result))
{
?>
<option value="<?=$row["id"]?>" <? if($row["id"]==1) echo "selected"?>><?=$row["typename"]?></option>
<?
}
closeconn($conn);
?>
</select>
</td>
</tr>
<tr>
<td> </td>
<td><input name="Submit3" type="submit" class="pt9" value="添 加">
<input name="Submit4" type="reset" class="pt9" value="取 消"></td>
</tr>
</table>

</td>
</tr>
<tr>
<td class="pt9"><p><font color="#0066CC">上传说明:<br>
<br>
标题要在首页上显示,最好简单明了。 <br>
URL为标准链接格式,例如:<br>
微软格式 mms://www2.cadi.net/media/abc.wmv<br>
REAL格式 </font></p>
</td>
</tr>
</table>
</form>


</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr height="12">
<td></td>
</tr>
<tr>
<td><table width="100%" cellpadding="1" cellspacing="1" bgcolor="#6699FF">
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="center" class="pt9">
<p><font color="#006699">Acard 2002-08-29 v 1.0</font></p>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<p class="pt9"> </p>
<?
}
?>
</body>
</html>
Lmir 2005-04-23
  • 打赏
  • 举报
回复
下一跳转页面,main.php:
<? session_start();?>
<?php include("config.php"); ?>
<?php include("func.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>多媒体文件管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>
<?
if ($_SESSION["usertype"]>=1&&$_SESSION["usertype"]<=5)
{
//echo $_SESSION["usertype"];
?>
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" cellpadding="1" cellspacing="1" bgcolor="#6699FF">
<tr>
<td height="25" bgcolor="#FFFFFF"><div align="center" class="pt12"><font color="#006699">多媒体文件管理中心
V1.0版</font></div></td>
</tr>
</table></td>
</tr>
<tr height="12">
<td></td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="1" cellspacing="1" bgcolor="#6699FF">
<tr>
<td width="180" valign="top" bgcolor="#FFFFFF"><table width="95%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td class="pt9">支持的多媒体文件类型</td>
</tr>
<tr>
<td height="30"><table width="75%" cellpadding="1" cellspacing="1" bgcolor="#6699FF">
<tr bgcolor="#FFFFFF">
<td width="22%" class="pt9"><div align="center"><img src="images/RM.gif" width="18" height="18"></div></td>
<td width="78%" class="pt9">RealPlay格式</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="pt9"><div align="center"><img src="images/avi.gif" width="18" height="18"></div></td>
<td class="pt9">AVI格式</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="pt9"><div align="center"><img src="images/WMV.gif" width="18" height="18"></div></td>
<td class="pt9">WMV格式</td>
</tr>
</table></td>
</tr>
<tr>
<td> <hr size="1"></td>
</tr>
<tr>
<td>
<table width="75%" cellpadding="1" cellspacing="1" bgcolor="#6699FF">
<tr bgcolor="#FFFFFF">
<td class="pt9"><div align="center"><a href="changepwd.php?name=<?=$_SESSION["username"]?>">更改密码</a></div></td>
</tr>
<?
if($_SESSION["usertype"]==1)
{
?>
<tr bgcolor="#FFFFFF">
<td class="pt9"><div align="center">管理用户</div></td>
</tr>
<?
}
?>
</table>
</td>
</tr>
</table></td>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#D7D7D7" class="pt9">
<td width="30" height="23"><div align="center"><font color="#0033CC">ID</font></div></td>
<td height="23"><div align="center"><font color="#0033CC">标 题</font></div></td>
<td width="30" height="23"><div align="center"><font color="#0033CC">格式</font></div></td>
<td width="30" height="23"><div align="center"><font color="#0033CC">修改</font></div></td>
<td width="30" height="23"><div align="center"><font color="#0033CC">删除</font></div></td>
</tr>
fzjw 2005-04-23
  • 打赏
  • 举报
回复
是session的问题,也是最头疼的问题

正常情况下,session不会有什么问题,如果有了问题,巨麻烦,多想办法,慢慢解决吧,别人的配置不一定适合你的环境
Lmir 2005-04-23
  • 打赏
  • 举报
回复
ding

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧