Home  >  Article  >  Backend Development  >  重新整理网页内容字段权限有关问题

重新整理网页内容字段权限有关问题

WBOY
WBOYOriginal
2016-06-13 13:52:42902browse

重新整理网页内容字段权限问题
我的要求是游客看不到[!--Ic--] 字段里的内容,登录后才能看到。

下面这个代码游客还是能看到[!--Ic--]字段里的内容,同时,也能看到 [!--goneng--]字段里的内容

我是说不让游客查看我所限制字段里的内容!

按原贴 :http://bbs.phome.net/showthread-13-104245-0.html 第三楼贴子做的。

?
if($_COOKIE[mvupamlgroupid])
{
echo "[!--Ic--] ";
}
elseif($_COOKIE[mvupamlgroupid]==1)
{
echo"[!--goneng--]";
}
?

---------------------------------------------------
$phome_cookievarpre="mvupa"; //前台cookie变量前缀
$phome_cookieadminvarpre="tbslm"; //后台cookie变量前缀  

变量“mvupa”是安装时随机生成的

怎么不好使呢? 生成的页面也看不到上述代码,也不能控制,游客不用登录啥都能看到

------解决方案--------------------
楼主不仔细

if($_COOKIE[mvupamlgroupid])
{
echo "[!--Ic--] ";



少了个 "!"
------解决方案--------------------
?
if(!$_COOKIE[mvupamlgroupid])
{
echo "[!--Ic--] ";
}
elseif($_COOKIE[mvupamlgroupid]==1)
{
echo"[!--goneng--]";
}
?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn