Home  >  Article  >  php教程  >  phpcms $CATEGORYS 变量

phpcms $CATEGORYS 变量

WBOY
WBOYOriginal
2016-06-06 20:11:491438browse

在做模板过程中,发现有些页面无法使用$CATEGORYS 变量,以下这段代码,是检查$CATEGORYS变量是否存在,如果不存在则进行声明。?php if(!isset($CATEGORYS)) { $CATEGORYS = getcache('category_content_'.$siteid,'commons'); } ?一般我是习惯直接放到通用

在做模板过程中,发现有些页面无法使用$CATEGORYS 变量,以下这段代码,是检查$CATEGORYS变量是否存在,如果不存在则进行声明。 一般我是习惯直接放到通用的头部模板里,这样,调用头部的页面就都会有$CATEGORYS这个栏目信息的变量了。
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
Previous article:在Ubuntu中安装PHPNext article:PHP编程学习笔记