### [phpcmsv9怎样判断登录](https://www.prosaas.cn/article/2144) **Published:** 2019-10-31T08:52:18 **Author:** 5201314 **Excerpt:** phpcms v9判断登录:首先要获取userid 然后再判断是否为空 完整代码: 以上就是phpcmsv9怎… ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212120639937.jpg) phpcms v9判断登录: 首先要获取userid {php$userid=param::get\_cookie('\_userid');} 然后再判断是否为空 {if $userid}。。。这里写已经登录之后的代码。。。{else}。。。这里写已经登录之后的代码。。。{/if} 完整代码: {php$userid=param::get\_cookie('\_userid');$forward=trim($url);} {if$userid} 登录后的内容 {else} <ahref="{APP\_PATH}index.php?m=member&c=index&a=login&forward={urlencode($url)}&siteid={$siteid}"target="\_top"> 以上就是phpcmsv9怎样判断登录的详细内容,更多请关注知企PROSAAS其它相关文章! **Categories:** PHPCMS ---