<?php
require_once(dirname(__FILE__)."/config.php");
AjaxHead();
if($myurl == '')
{
exit('');
}
$uid = $cfg_ml->M_LoginID;
!$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女')? 'dfgirl' : 'dfboy';
$facepic = empty($face)? $cfg_ml->fields['face'] : $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png';
?>
<?php require_once(dirname(__FILE__)."/config.php");AjaxHead();if($myurl == ''){ exit('');}$uid = $cfg_ml->M_LoginID;
!$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女')? 'dfgirl' : 'dfboy';$facepic = empty($face)? $cfg_ml->fields['face']
: $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png';
?>
<?php $rank=$cfg_ml->M_Rank; $row = $dsql->GetOne(" Select * From dede_addon17 where aid =$id"); ?>
<?php if($rank>=200){echo iconv("UTF-8","GB2312","<a onclick='disp_alert()' href=/member/buy.php>您无权查看,请购买</a>");} else{echo $row['dianhua'] ;} ?>
现在没登陆之前是显示“请注册查看”是对的,登陆后直接执行else,rank积分大于200也是执行else if不执行,而且dianhua字段也输出空白,数据表没错...求牛人指点!
检查研究了一上午,头开始懵了
------解决方案--------------------
dianhua 讀不到數據是因為$row沒有數據。
$row = $dsql->GetOne(" Select * From dede_addon17 where aid =$id");
$id 的值是什麼,沒有看到你有獲取 $id
如果是會員的資料,應該是前面獲取的$uid 吧。
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群