Home  >  Article  >  CMS Tutorial  >  How to determine login in phpcmsv9

How to determine login in phpcmsv9

尚
Original
2019-10-31 16:52:182559browse

How to determine login in phpcmsv9

phpcms v9 determines login:

First get the userid

{php$userid=param::get_cookie('_userid');}

and then determine whether it is empty

{if $userid}。。。这里写已经登录之后的代码。。。{else}。。。这里写已经登录之后的代码。。。{/if}

Complete code:

{php$userid=param::get_cookie('_userid');$forward=trim($url);}
{if$userid}
登录后的内容
{else}
<<span style="">ahref="{APP_PATH}index.php?m=member&c=index&a=login&forward={urlencode($url)}&siteid={$siteid}"target="_top">

The above is the detailed content of How to determine login in phpcmsv9. For more information, please follow other related articles on the PHP Chinese website!

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