这个是会员登录的页面,如果直接打开无法显示该网页,但如果通过其他页面登录了,就会提示您已经登录了,是什么原因
我的是WIN2003系统,程序是PHP5.3.3,
网站里还有几个页面也是跟这个类似,都是无法显示,兄弟们帮忙<?php
include_once('include/init.inc.php');
require_once("gb_1/hot.class.php");
$hot=new HOT($db);
if ($dang_uid)
{
$ref="/".$_CFG['indentity'][$aVinfo['indentity']]."/".$aVinfo['id']."/";
exit("您已经登录了!<a href=$ref>返回</a>");
}
if(!empty($_POST))
{
$referer=html($_POST['referer']);
$sUserName = html(trim($_POST['username']));
$sPassWord = md5(strtolower(trim($_POST['password'])));
$from=html($_POST['from']);
$res=GetMember_M($sUserName,1);
if(!empty($res) && $res[password]==$sPassWord)
{
$error="";
if($res['indentity']==3 && $res['goodlevel']<=0)
{
$error='你的商家帐号需要通过实名认证才能正常使用';
}
if($res['isactive'] && $error=="")
{
//每日只在第一次登陆加分
credits_oper($res['uid'],'comm',2);
//////////////////////////
$cookietime=$_CFG['cookie']['expiry'];
setSysCookie($res['uid'],$res['username'],$res['indentity'],$res['password'],$res['nick'],$res['styleid'],$res['groupid'],$res['adminid'],$res['costid']);
$dang_uid=$res[uid];
$dang_ind_cn=$_CFG['indentity'][$res['indentity']];
if(strpos($referer,'thread-') || strpos($referer,'money/') || strpos($referer,'redirect.php') || strpos($referer,'weituo.php') || strpos($referer,'my/') || $from=='wrap_index')
$headerUrl=$referer;
else
{
//$headerUrl=($res['indentity']==2)?"/".$_CFG['indentity'][$res['indentity']]."/infocenter".$res['uid']."/":"/my/";
$headerUrl="/my/";
}
header("location: $headerUrl");
}
else
{
if($res['indentity']==3)
{
if ($error=="") $error='您需要激活才能正常使用';
}
else
{
$sEmailhref=strpbrk($res['email'],'@')?'http://www.'.str_replace('@','',strpbrk($res['email'],'@')):'http://www.123.com';
foreach($_CFG['email'] as $k=>$v)
{
if(strpbrk($res['email'],'@')=='@'.$v)
{
$sEmailhref=$_CFG['emailhref'][$k];
break;
}
}
$error='你还没有激活账号:<br />1、<a href="'.$sEmailhref.'" target="_blank">立刻去邮箱激活账号</a><br />2、通过邮箱 <a href="/login.php?act=active&oper=repeat" target="_blank">重新获取激活码</a> <a href="/login.php?act=active&oper=mdfmail" target="_blank">修改邮箱地址</a>';
}
}
}
else
{
$error="用户名或密码输入错误! <a href=\"/get_password.php\" target=\"_blank\">找回密码?</a>";
}
}
//下面图片广告(热点145)3条数据
$hot145=$hot->GetAllHotByBlockid(145);
foreach ($hot145 as $k=>$v)
{
$hot145[$k]['html']=$hot->GetHotFile($v['hotblockid'],$v['hotid'],trim($v['fileformat']),270,44,$v['url']);
}
//下面最新公告
$hot146=$hot->GetAllHotByBlockid(146);
foreach ($hot146 as $k=>$v)
{
$hot146[$k]['key']=$k+1;
}
$hid_referer=html($_GET['referer'])?html($_GET['referer']):referer();
$TPL->assign('hid_referer',$hid_referer);
$TPL->assign('sUserName',$sUserName);
$TPL->assign('error',$error);
$TPL->assign('from',$from);
$TPL->assign('hot145',$hot145);
$TPL->assign('hot146',$hot146);
$TPL->display('login.html');
include_once(ROOT.'/templates/start/footer.html');
?>
我的是WIN2003系统,程序是PHP5.3.3,
网站里还有几个页面也是跟这个类似,都是无法显示,兄弟们帮忙<?php
include_once('include/init.inc.php');
require_once("gb_1/hot.class.php");
$hot=new HOT($db);
if ($dang_uid)
{
$ref="/".$_CFG['indentity'][$aVinfo['indentity']]."/".$aVinfo['id']."/";
exit("您已经登录了!<a href=$ref>返回</a>");
}
if(!empty($_POST))
{
$referer=html($_POST['referer']);
$sUserName = html(trim($_POST['username']));
$sPassWord = md5(strtolower(trim($_POST['password'])));
$from=html($_POST['from']);
$res=GetMember_M($sUserName,1);
if(!empty($res) && $res[password]==$sPassWord)
{
$error="";
if($res['indentity']==3 && $res['goodlevel']<=0)
{
$error='你的商家帐号需要通过实名认证才能正常使用';
}
if($res['isactive'] && $error=="")
{
//每日只在第一次登陆加分
credits_oper($res['uid'],'comm',2);
//////////////////////////
$cookietime=$_CFG['cookie']['expiry'];
setSysCookie($res['uid'],$res['username'],$res['indentity'],$res['password'],$res['nick'],$res['styleid'],$res['groupid'],$res['adminid'],$res['costid']);
$dang_uid=$res[uid];
$dang_ind_cn=$_CFG['indentity'][$res['indentity']];
if(strpos($referer,'thread-') || strpos($referer,'money/') || strpos($referer,'redirect.php') || strpos($referer,'weituo.php') || strpos($referer,'my/') || $from=='wrap_index')
$headerUrl=$referer;
else
{
//$headerUrl=($res['indentity']==2)?"/".$_CFG['indentity'][$res['indentity']]."/infocenter".$res['uid']."/":"/my/";
$headerUrl="/my/";
}
header("location: $headerUrl");
}
else
{
if($res['indentity']==3)
{
if ($error=="") $error='您需要激活才能正常使用';
}
else
{
$sEmailhref=strpbrk($res['email'],'@')?'http://www.'.str_replace('@','',strpbrk($res['email'],'@')):'http://www.123.com';
foreach($_CFG['email'] as $k=>$v)
{
if(strpbrk($res['email'],'@')=='@'.$v)
{
$sEmailhref=$_CFG['emailhref'][$k];
break;
}
}
$error='你还没有激活账号:<br />1、<a href="'.$sEmailhref.'" target="_blank">立刻去邮箱激活账号</a><br />2、通过邮箱 <a href="/login.php?act=active&oper=repeat" target="_blank">重新获取激活码</a> <a href="/login.php?act=active&oper=mdfmail" target="_blank">修改邮箱地址</a>';
}
}
}
else
{
$error="用户名或密码输入错误! <a href=\"/get_password.php\" target=\"_blank\">找回密码?</a>";
}
}
//下面图片广告(热点145)3条数据
$hot145=$hot->GetAllHotByBlockid(145);
foreach ($hot145 as $k=>$v)
{
$hot145[$k]['html']=$hot->GetHotFile($v['hotblockid'],$v['hotid'],trim($v['fileformat']),270,44,$v['url']);
}
//下面最新公告
$hot146=$hot->GetAllHotByBlockid(146);
foreach ($hot146 as $k=>$v)
{
$hot146[$k]['key']=$k+1;
}
$hid_referer=html($_GET['referer'])?html($_GET['referer']):referer();
$TPL->assign('hid_referer',$hid_referer);
$TPL->assign('sUserName',$sUserName);
$TPL->assign('error',$error);
$TPL->assign('from',$from);
$TPL->assign('hot145',$hot145);
$TPL->assign('hot146',$hot146);
$TPL->display('login.html');
include_once(ROOT.'/templates/start/footer.html');
?>
error_reporting(E_ALL);
<?php
error_reporting(E_ALL);
include_once('include/init.inc.php');
require_once("gb_1/hot.class.php");
$hot=new HOT($db);
if ($dang_uid) 前面我改成这样的,但还是显示为无法显示,没有任何错误提示
display_errors = On
我不知道PHP是不是有什么配置,
因为我感觉好像是跟调用html文件有关的,之前是在LINUX服务器上的,现在换成WIN2003的,用的是IIS
之前程序是SVN发布的 ,不知道和这个有没有关系