dedecms页面如何获取会员状态的实例代码_javascript技巧
你看下这资料
参考资料:
更新 622
来源,以及作者跟原文章有关,原文章没有写就不会有的。
这个采集成功率大概有95%,采集不了就只能手动添加了,不是很多。
BASE64:e2RlZGU6bGlzdGNvbmZpZ30NCntkZWRlOm5vdGVpbmZvIG5vdGVuYW1lPSJiYrLJvK8iIGNoYW5uZWxpZD0iMSIgbWFjdGh0eXBlPSJzdHJpbmciDQoJcmVmdXJsPSJodHRwOi8vIiBzb3VyY2VsYW5nPSJ1dGYtOCIgY29zb3J0PSJhc2MiDQogIGlzcmVmPSJubyIgZXhwdGltZT0iMTAiIHVzZW1vcmU9IjAiIC99DQp7ZGVkZTpsaXN0cnVsZSBzb3VyY2V0eXBlPSJiYXRjaCIgcnNzdXJsPSJodHRwOi8vIiByZWd4dXJsPSJodHRwOi8vd3d3LmJhYnl0cmVlLmNvbS9sZWFybi94dWVsaW5ncWlhbi96YW9xaWppYW95dS8oKikiDQpzdGFydGlkPSIwIiBlbmRpZD0iOTkiIGFkZHY9IjEiIHVybHJ1bGU9ImFyZWEiIG11c3RoYXM9IiINCiBub3RoYXM9IiIgbGlzdHBpYz0iMSIgdXNlbW9yZT0iMCJ9DQoJe2RlZGU6YWRkdXJsc317L2RlZGU6YWRkdXJsc30NCgl7ZGVkZTpiYXRjaHJ1bGV9ey9kZWRlOmJhdGNocnVsZX0NCgl7ZGVkZTpyZWd4cnVsZX17L2RlZGU6cmVneHJ1bGV9DQoJe2RlZGU6YXJlYXN0YXJ0fTx1bCBjbGFzcz0idGV4dExpc3QgdGV4dExpc3RCaWciPnsvZGVkZTphcmVhc3RhcnR9DQoJe2RlZGU6YXJlYWVuZH08L3VsPnsvZGVkZTphcmVhZW5kfQ0Key9kZWRlOmxpc3RydWxlfQ0KDQp7L2RlZGU6bGlzdGNvbmZpZ30NCg0Ke2RlZGU6aXRlbWNvbmZpZ30NCntkZWRlOnNwcGFnZSBzcHR5cGU9J2Z1bGwnfXsvZGVkZTpzcHBhZ2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nJyBpc3VuaXQ9JzEnIGlzZG93bj0nMSd9DQogICB7ZGVkZTptYXRjaH08ZGl2IGNsYXNzPSJLX2NvbnRlbnQiPlvE2sjdXTxkaXYgY2xhc3M9J2xvb2tQYWdlanVtcCcgc3R5bGU9InRleHQtYWxpZ246Y2VudGVyOyI+ey9kZWRlOm1hdGNofQ0KICAge2RlZGU6dHJpbSByZXBsYWNlPSIifTxoMT48c3Bhbj4oLiopPC9oMT57L2RlZGU6dHJpbX0NCntkZWRlOnRyaW0gcmVwbGFjZT0iIn08ZGl2IGNsYXNzPSJ0aW1lS2V5d29yZCIgYWxpZ249ImNlbnRlciIgc3R5bGU9ImNvbG9yOmdyYXk7IiA+KC4qKTwvZGl2PnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifTxkaXYoW14uXSopPnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifTwvZGl2PnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifTxhKFtePl0qKT4oLiopPC9hPnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifX08cD57L2RlZGU6dHJpbX0NCiAgIHtkZWRlOmZ1bmN0aW9ufQ0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCnsvZGVkZTpmdW5jdGlvbn0NCnsvZGVkZTppdGVtfQ0Key9kZWRlOml0ZW1jb25maWd9:END
dedecms页面如何获取会员状态的实例代码
前几天做了一个企业网站,导航栏增加了会员信息,如:
已登陆:显示:欢迎 未登陆 显示: 请登录
代码如下:
代码如下:
{dede:php}
require_once(DEDEMEMBER"/configphp");
$uid = $cfg_ml->M_LoginID;
if(!$uid){
echo '
登录 |加入
';
}else{
echo '
'$uid' |/index_dophpfmdo=login&dopost=exit">登出
';
}
{/dede:php}
安装后会在根目录的data文件夹中生成一个commonincphp文件,这个文件就是配置文件,
其中$cfg_dbhost = 'localhost';代表主机,一般为默认
$cfg_dbname = 'qzmh';数据库名
$cfg_dbuser = 'root';用户名
$cfg_dbpwd = 'root';用户密码
$cfg_dbprefix = 'dede_';表前缀
$cfg_db_language = 'utf8';字符编码
希望对你有帮助,望采纳。
0条评论