PHPCMS V9模板设计常用变量有哪些
PHPCMS V9模板设计常用变量
用户变量:
$_userid 用户id
$_username 用户名
$_areaid 地区id
$_groupid 用户组id
$_modelid
$_amount 用户资金
$_point 用户点数
$_message
$_email 用户email
$_userid 用户id
$_username 用户名
$_areaid 地区id
$_groupid 用户组id
$_modelid
$_amount 用户资金
$_point 用户点数
$_message
$_email 用户email
有关模型信息变量:
$MODEL[$modelid][modelid] 模型id
$MODEL[$modelid][name] 模型名称
$MODEL[$modelid][tablename] 模型表
$MODEL[$modelid][itemname] 项目名称
$MODEL[$modelid][workflowid] 工作流方案
$MODEL[$modelid][modelid] 模型id
$MODEL[$modelid][name] 模型名称
$MODEL[$modelid][tablename] 模型表
$MODEL[$modelid][itemname] 项目名称
$MODEL[$modelid][workflowid] 工作流方案
如: view plaincopy to clipboardprint?
$MODEL[1][modelid] = 1
$MODEL[1][name] = 新闻
$MODEL[1][tablename] = news
$MODEL[1][itemname] = 新闻
$MODEL[1][workflowid] = 1
$MODEL[1][modelid] = 1
$MODEL[1][name] = 新闻
$MODEL[1][tablename] = news
$MODEL[1][itemname] = 新闻
$MODEL[1][workflowid] = 1
栏目信息变量:
$CATEGORY[$catid][catid] 栏目id
$CATEGORY[$catid][module] 栏目所在的模块
$CATEGORY[$catid][type] 栏目类型
$CATEGORY[$catid][modelid] 栏目所属模型id
$CATEGORY[$catid][catname] 栏目名称
$CATEGORY[$catid][style] 栏目名称样式
$CATEGORY[$catid][image] 栏目图片
$CATEGORY[$catid][catdir] 栏目路径
$CATEGORY[$catid][url] 目录url
$CATEGORY[$catid][parentid] 栏目的父id
$CATEGORY[$catid][arrparentid] 所有上级栏目ID
$CATEGORY[$catid][parentdir] 父栏目的路径
$CATEGORY[$catid][child] 是否有子栏目
$CATEGORY[$catid][arrchildid] 栏目的所有子栏目id
$CATEGORY[$catid][items] 栏目信息数
$CATEGORY[$catid][ismenu] 栏目是否显示导航
$CATEGORY[$catid][catid] 栏目id
$CATEGORY[$catid][module] 栏目所在的模块
$CATEGORY[$catid][type] 栏目类型
$CATEGORY[$catid][modelid] 栏目所属模型id
$CATEGORY[$catid][catname] 栏目名称
$CATEGORY[$catid][style] 栏目名称样式
$CATEGORY[$catid][image] 栏目图片
$CATEGORY[$catid][catdir] 栏目路径
$CATEGORY[$catid][url] 目录url
$CATEGORY[$catid][parentid] 栏目的父id
$CATEGORY[$catid][arrparentid] 所有上级栏目ID
$CATEGORY[$catid][parentdir] 父栏目的路径
$CATEGORY[$catid][child] 是否有子栏目
$CATEGORY[$catid][arrchildid] 栏目的所有子栏目id
$CATEGORY[$catid][items] 栏目信息数
$CATEGORY[$catid][ismenu] 栏目是否显示导航
模块信息变量:
$MODULE[phpcms][module] 模块英文名称
$MODULE[phpcms][name] 模块中文名
$MODULE[phpcms][path] 模块安装路径
$MODULE[phpcms][url] 模块链接URL
$MODULE[phpcms][iscore] 是否系统模块
$MODULE[phpcms][version] 版本号
$MODULE[phpcms][module] 模块英文名称
$MODULE[phpcms][name] 模块中文名
$MODULE[phpcms][path] 模块安装路径
$MODULE[phpcms][url] 模块链接URL
$MODULE[phpcms][iscore] 是否系统模块
$MODULE[phpcms][version] 版本号
系统变量($PHPCMS):
$PHPCMS[phpcmsusername] => Phpcms 官方网站帐号
$PHPCMS[phpcmspassword] => Phpcms 官方网站密码
$PHPCMS[sitename] => 网站名称
$PHPCMS[siteurl] => 网站地址
$PHPCMS[ishtml] => 生成Html
$PHPCMS[fileext] => 生成文件扩展名
$PHPCMS[enable_urlencode] => 启用内容页URL加密转换
$PHPCMS[meta_title] => Title(网站标题)
$PHPCMS[meta_keywords] => Meta Keywords(网页关键词)
$PHPCMS[meta_description] => Meta Description(网页描述)
$PHPCMS[copyright] => 版权信息
$PHPCMS[icpno] => 网站ICP备案序号
$PHPCMS[pageshtml] => 分页代码
$PHPCMS[segmentclass] => 中文分词方式
$PHPCMS[enablegetkeywords] => 启用自动提取关键词功能
$PHPCMS[areaid] => 网站默认地区
$PHPCMS[editor_max_data_hour] => 数据恢复保留时间
$PHPCMS[editor_interval_data] => 数据恢复自动保存时间间隔
$PHPCMS[category_count] => 开启栏目统计
$PHPCMS[show_hits] => 显示浏览次数
$PHPCMS[maxpage] => 列表页最大页数
$PHPCMS[pagesize] => 列表页默认信息数(条)
$PHPCMS[autoupdatelist] => 更新内容时列表页自动生成页数
$PHPCMS[search_time] => 搜索时间间隔
$PHPCMS[search_maxresults] => 搜索返回最多的结果数
$PHPCMS[search_pagesize] => 搜索每页信息数
$PHPCMS[adminaccessip] =>
$PHPCMS[maxloginfailedtimes] => 后台最大登陆失败次数
$PHPCMS[maxiplockedtime] => IP锁定时间
$PHPCMS[enable_ipbanned] => IP访问禁止
$PHPCMS[minrefreshtime] => 连续两次刷新最短时间间隔
$PHPCMS[filter_word] => 非法词语列表
$PHPCMS[thumb_enable] => 允许前台上传附件
$PHPCMS[thumb_width] => 缩略图宽度
$PHPCMS[thumb_height] => 缩略图高度
$PHPCMS[watermark_enable] => 启用缩略图功能
$PHPCMS[watermark_minwidth] => 水印宽度
$PHPCMS[watermark_minheight] => 水印高度
$PHPCMS[watermark_img] => 水印图片地址
$PHPCMS[watermark_pct] => 水印透明度
$PHPCMS[watermark_quality] => JPEG 水印质量
$PHPCMS[watermark_pos] => 水印添加位置
$PHPCMS[mail_type] => 邮件发送方式
$PHPCMS[mail_server] => 邮件服务器地址
$PHPCMS[mail_port] => 邮件服务器端口
$PHPCMS[mail_user] => 邮箱帐号
$PHPCMS[mail_password] => 邮箱密码
$PHPCMS[mail_sign] => 邮件签名
$PHPCMS[enablepassport] => 是否启用正向通行证
$PHPCMS[passport_file] => 整合程序
$PHPCMS[passport_charset] => 整合程序字符集
$PHPCMS[passport_url] => 通行证接口地址
$PHPCMS[passport_key] => 通行证私有密钥
$PHPCMS[enableserverpassport] => 是否启用反向通行证
$PHPCMS[passport_serverurl] => 反向通行证接口地址
$PHPCMS[passport_registerurl] => 通行证会员注册地址
$PHPCMS[passport_loginurl] => 通行证会员登录地址
$PHPCMS[passport_logouturl] => 通行证会员退出地址
$PHPCMS[passport_getpasswordurl] => 通行证会员找回密码地址
$PHPCMS[passport_serverkey] => 通行证私有密钥
$PHPCMS[passport_expire] => 验证字串有效期(秒):
$PHPCMS[uc] => 是否启动UcenterClient 配置
$PHPCMS[uc_api] => Ucenter api 地址
$PHPCMS[uc_ip] => Ucenter 主机IP地址
$PHPCMS[uc_dbhost] => Ucenter 数据库主机名
$PHPCMS[uc_dbuser] => Ucenter 数据库用户名
$PHPCMS[uc_dbpwd] => Ucenter 数据库密码
$PHPCMS[uc_dbname] => Ucenter 数据库名
$PHPCMS[uc_dbpre] => Ucenter 数据库表前缀
$PHPCMS[uc_charset] => Ucenter 数据库字符集
$PHPCMS[uc_appid] => 应用id(APP ID)
$PHPCMS[uc_key] => Ucenter 通信密钥
$PHPCMS[enabletm] => 是否启动扩展设置
$PHPCMS[qq] => QQ
$PHPCMS[msn] => MSN
$PHPCMS[skype] => SKYPE
$PHPCMS[taobao] => 阿里旺旺(淘宝版)
$PHPCMS[alibaba] => 阿里旺旺(贸易通版)
$PHPCMS[version] => 版本号
///////////////////////////////////////////////////////////////////
Phpcms V9 文件目录结构
根目录
| – api 接口文件目录
| – caches 缓存文件目录
| – configs 系统配置文件目录
| – caches_* 系统缓存目录
| – phpcms phpcms框架主目录
| – languages 框架语言包目录
| – libs 框架主类库、主函数库目录
| – model 框架数据库模型目录
| – modules 框架模块目录
| – templates 框架系统模板目录
| – phpsso_server phpsso主目录
| – statics 系统附件包
| – css 系统css包
| – images 系统图片包
| – js 系统js包
| – uploadfile 网站附件目录
| – admin.php 后台管理入口
| – index.php 程序主入口
| – crossdomain.xml FLASH跨域传输文件
| – robots.txt 搜索引擎蜘蛛限制配置文件
| – favicon.ico 系统icon图标
更多相关知识,请访问 PHP中文网!!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Environment variables are the path to the location (or environment) where applications and programs run. They can be created, edited, managed or deleted by the user and come in handy when managing the behavior of certain processes. Here's how to create a configuration file to manage multiple variables simultaneously without having to edit them individually on Windows. How to use profiles in environment variables Windows 11 and 10 On Windows, there are two sets of environment variables – user variables (apply to the current user) and system variables (apply globally). However, using a tool like PowerToys, you can create a separate configuration file to add new and existing variables and manage them all at once. Here’s how: Step 1: Install PowerToysPowerTo

Strict mode was introduced in PHP7, which can help developers reduce potential errors. This article will explain what strict mode is and how to use strict mode in PHP7 to reduce errors. At the same time, the application of strict mode will be demonstrated through code examples. 1. What is strict mode? Strict mode is a feature in PHP7 that can help developers write more standardized code and reduce some common errors. In strict mode, there will be strict restrictions and detection on variable declaration, type checking, function calling, etc. Pass
![Internal error: Unable to create temporary directory [Resolved]](https://img.php.cn/upload/article/000/000/164/168171504798267.png?x-oss-process=image/resize,m_fill,h_207,w_330)
Windows system allows users to install various types of applications on your system using executable/setup files. Recently, many Windows users have started complaining that they are receiving an error named INTERNALERROR:cannotCreateTemporaryDirectory on their systems while trying to install any application using an executable file. The problem is not limited to this but also prevents the users from launching any existing applications, which are also installed on the Windows system. Some possible reasons are listed below. Run the executable to install without granting administrator privileges. An invalid or different path was provided for the TMP variable. damaged system

Instance variables in Java refer to variables defined in the class, not in the method or constructor. Instance variables are also called member variables. Each instance of a class has its own copy of the instance variable. Instance variables are initialized during object creation, and their state is saved and maintained throughout the object's lifetime. Instance variable definitions are usually placed at the top of the class and can be declared with any access modifier, which can be public, private, protected, or the default access modifier. It depends on what we want this to be

Python is widely used in a wide range of fields with its simple and easy-to-read syntax. It is crucial to master the basic structure of Python syntax, both to improve programming efficiency and to gain a deep understanding of how the code works. To this end, this article provides a comprehensive mind map detailing various aspects of Python syntax. Variables and Data Types Variables are containers used to store data in Python. The mind map shows common Python data types, including integers, floating point numbers, strings, Boolean values, and lists. Each data type has its own characteristics and operation methods. Operators Operators are used to perform various operations on data types. The mind map covers the different operator types in Python, such as arithmetic operators, ratio

Using Ajax to obtain variables from PHP methods is a common scenario in web development. Through Ajax, the page can be dynamically obtained without refreshing the data. In this article, we will introduce how to use Ajax to get variables from PHP methods, and provide specific code examples. First, we need to write a PHP file to handle the Ajax request and return the required variables. Here is sample code for a simple PHP file getData.php:

PHP function introduction—strpos(): Check whether a variable is a string In PHP, is_string() is a very useful function, which is used to check whether a variable is a string. When we need to determine whether a variable is a string, the is_string() function can help us achieve this goal easily. Below we will learn about how to use the is_string() function and provide some related code examples. The syntax of the is_string() function is very simple. it only needs to

jQuery is a JavaScript library widely used in web development. It provides many simple and convenient methods to operate web page elements and handle events. In actual development, we often encounter situations where we need to determine whether a variable is empty. This article will introduce several common methods of using jQuery to determine whether a variable is empty, and attach specific code examples. Method 1: Use the if statement to determine varstr="";if(str){co
