dede 判断是否登录

2019年07月21日 13:46:31 发表评论 阅读

例如新建立 member.php 放在根目录

<?php
require_once(dirname(__FILE__)."/member/config.php"); 
if(!$cfg_ml->IsLogin()) 
{
echo "未登录";
}
else
{
echo $cfg_ml->M_UserName;//输出uname
}
?>

至于你要显示什么你自己可以写,帮你列举一些。

echo $cfg_ml->M_UserName;
echo "";
echo $cfg_ml->M_ID;
echo "";
echo $cfg_ml->M_MbType;
echo "";
echo $cfg_ml->M_Money;
echo "";
echo $cfg_ml->M_Scores;
echo "";
echo $cfg_ml->M_UserName;
echo "";
echo $cfg_ml->M_Rank;
echo "";
echo $cfg_ml->M_Face;
echo "";
echo $cfg_ml->M_LoginTime;
echo "";
echo $cfg_ml->M_KeepTime;
echo "";
echo $cfg_ml->M_Spacesta;
echo "";
echo $cfg_ml->M_Honor;
echo "";
echo $cfg_ml->fields['sex'];
echo "";
echo $cfg_ml->fields['email'];
echo "";
echo $cfg_ml->fields['honor'];
echo "";
echo $cfg_ml->fields['matt'];




adminMemberLogin Object    你也可以直接打印print_r($cfg_ml) 查看数组

(    
   [M_ID] => 1    
   [M_LoginID] => admin    
   [M_MbType] => 个人    
   [M_Money] => 0    
   [M_Scores] => 10000    
   [M_UserName] => admin    
   [M_Rank] => 100    
   [M_Face] =>    
   [M_LoginTime] => 1393946471    
   [M_KeepTime] => 604800    
   [M_Spacesta] => 0    
   [fields] => Array    
       (    
           [mid] => 1    
           [mtype] => 个人    
           [userid] => admin    
           [pwd] => 21232f297a57a5a743894a0e4a801fc3    
           [uname] => admin    
           [sex] => 男    
           [rank] => 100    
           [uptime] => 0    
           [exptime] => 0    
           [money] => 0    
           [email] =>    
           [scores] => 10000    
           [matt] => 10    
           [spacesta] => 0    
           [face] =>    
           [safequestion] => 0    
           [safeanswer] =>    
           [jointime] => 1376494666    
           [joinip] =>    
           [logintime] => 1393946471    
           [loginip] => 127.0.0.1    
           [checkmail] => -1    
           [honor] => 上校    
       )    
   [isAdmin] => 1    
   [M_UpTime] => 0    
   [M_ExpTime] => 0    
   [M_HasDay] =>    
   [M_JoinTime] => 2013-08-14    
   [M_Honor] => 上校    
   [memberCache] => memberlogin    
)


  • 我的微信:seausun
  • 这是我的微信扫一扫
  • weinxin
  • 你领一次红包多一份动力
  • 支付宝搜索156-5053-9852领取
  • weinxin