Home php教程 php手册 discuz全局数组变量 后台各项设置 完整版

discuz全局数组变量 后台各项设置 完整版

Jun 13, 2016 am 09:35 AM
aspnet software programming

<span $_G 保存了 Discuz! 中所有的预处理数据
缓存能够很好的提高程序的性能,一些配置数据没必要每次都查询数据库,只要在修改了的时候更新下缓存即可。
Discuz! 中所有的缓存保存在 $_G[cache] 中
$_G[member]     会员信息数据
$_G[uid]     用户 uid
$_G[username]     用户名
$_G[adminid]     用户管理组 id
$_G[groupid]     用户用户组 id
$_G[settting]     设置数据
$_G[cache]     系统缓存
$_G[cache][plugin]     插件缓存
载入缓存可以使用 loadcache() 函数,将缓存载入到 $_G[cache] 数组中

(1) 全局变量系统篇
$_G['uid'] => 当前登录UID 
$_G['username'] => 当前登录用户名 
$_G['adminid'] => 当前登录ID管理组ID 
$_G['groupid'] => 当前登录ID用户组ID
 

$_G['cookie'] => 客户端cookie 
$_G['formhash'] => 当前登录ID的【FORMHASH】 主要用于表单提交
$_G['timestamp'] => 当前活动时间
$_G['starttime'] => 1317042440.3242
$_G['clientip'] => 当前访问者IP地址 
$_G['referer'] => 当前请求的地址,主要用户表单提交
$_G['charset'] => 程序编码
$_G['PHP_SELF'] => 当前访问页面的相对地址 
$_G['siteurl'] => 程序访问地址 
$_G['siteroot'] => 程序所在域名的相对目录
$_G['fid'] => 当前版块id【主题列表页、帖子页】出现 
$_G['tid'] => 当前帖子ID【帖子页】出现 
$_G['basescript'] => 当前页面所在频道
$_G['basefilename'] => 当前页面php文件名 
$_G['staticurl'] => 程序附件目录 
$_G['mod'] => 当前页面的MOD值【例如:forum.php?mod=xxx】
$_G['inajax'] => 当前ajax请求的值【无-0 有-1】
$_G['page'] => 当前分页ID
$_G['tpp'] => 当前分页每页显示数量
$_G['seokeywords'] => 当前页面seo关键词
$_G['seodescription'] => 当前页面seo介绍
$_G['timenow'] => Array
(
[time] => 2011-9-26 21:07 当前服务器时间
[offset] => +8 当前服务器时区
) 
$_G['config'] => Array(
    $_G['config'][db] => Array( 
        $_G['config'][db][1] => Array(
            $_G['config'][db][1][dbhost] => localhost 数据库连接地址
            $_G['config'][db][1][dbuser] => root 数据库用户名
            $_G['config'][db][1][dbpw] => 123456 数据库密码
            $_G['config'][db][1][dbcharset] => utf8 数据库编码
            $_G['config'][db][1][pconnect] => 0
            $_G['config'][db][1][dbname] => dxutf 数据库名
            $_G['config'][db][1][tablepre] => pre_ 数据表前缀
        )
    )
)
 
(2) 全局后台各项设置篇
 
$_G['setting'][sitename] => 全局-站点信息-网站名称
 
$_G['setting'][siteurl] => 全局-站点信息-网站URL
 
$_G['setting'][regname] => 全局-注册访问-注册-注册地址
 
$_G['setting'][reglinkname] => 全局-注册访问-注册-注册链接文字
 
$_G['setting'][regverify] => 全局-注册访问-注册-新用户注册验证
 
$_G['setting'][icp] => 全局-站点信息-网站备案信息代码
 
$_G['setting'][imagelib] => 全局-上传设置-基本设置-图片处理库类型
 
$_G['setting'][extcredits] => 积分情况 自行打印
 
$_G['setting'][creditsformula] => 全局-积分设置-基本设置-总积分计算公式
 
$_G['setting'][cacheindexlife] => 全局-性能优化-论坛页面缓存设置-缓存论坛首页有效期
$_G['setting'][cachethreaddir] => 全局-性能优化-论坛页面缓存设置-缓存目录
 
$_G['setting'][cachethreadlife] => 全局-性能优化-论坛页面缓存设置-缓存帖子有效期
 
$_G['setting'][bbrulestxt] => 全局-注册访问-注册-网站服务条款
 
$_G['setting'][bbname] => 全局-站点信息-站点名称
 
$_G['setting'][attachurl] => 全局-上传设置-基本设置-本地附件URL地址
 
$_G['setting'][attachdir] => 全局-上传设置-基本设置-本地附件保存位置
 
$_G['setting'][anonymoustext] => 界面-界面设置-全局-匿名用户的昵称
 
$_G['setting'][threadsticky] => 界面-界面设置-主题列表-置顶主题的标识
 
$_G['setting'][defaultindex] => 默认首页文件名forum.php
 
$_G['setting'][verify] => 用户-认证设置
 
$_G['setting'][rewriterule] => 后台伪静态规则情况
 
$_G['setting'][ucenterurl] => UCenter地址
 
$_G['setting'][plugins] => 后台插件设置与启用情况
 
$_G['setting'][navlogos] => 后台界面设置-导航设置-内置导航的logo组
 
$_G['setting'][navmn] => 后台设置的导航情况,主要用于导航判断
$_G['setting'][navs] => 页头导航数组,可参考此数组进行页头导航重写
 
$_G['setting'][footernavs] => 页尾导航
 
$_G['setting'][spacenavs] => 家园模块左侧导航
 
$_G['setting'][mynavs] => 页头导航右边快捷导航按钮内容
 
$_G['setting'][topnavs] => 页头顶部导航内容
 
$_G['setting'][forumpicstyle] => Array 版块主题封面
(
$_G['setting'][forumpicstyle][thumbwidth] => 主题封面宽度
$_G['setting'][forumpicstyle][thumbheight] => 主题封面高度
)
 
$_G['setting'][activityfield] => 全局-站点功能-活动主题-发起者必填信息
 
$_G['setting'][activityextnum] => 全局-站点功能-活动主题-扩展资料项数量
 
$_G['setting'][activitypp] => 全局-站点功能-活动主题-用户列表每页显示参与活动的人数
 
$_G['setting'][activitycredit] => 全局-站点功能-活动主题-使用积分
 
$_G['setting'][activitytype] => 全局-站点功能-活动主题-内置类型
 
$_G['setting'][adminemail] => 全局-站点信息-管理员邮箱
 
 
(3)全局当前登录者信息篇
$_G['member'] => Array 当前登录用户个人信息
(
$_G['member'][uid] => UID
$_G['member'][email] => 邮箱地址
$_G['member'][username] => 用户名
$_G['member'][password] => 经过MD5后的密码(别乱输出!!!切记)$_G['member'][status] => 用户是否已经删除
$_G['member'][emailstatus] => 邮箱验证状态 0未验证 1验证通过
$_G['member'][avatarstatus] => 头像上传状态 0未上传 1已上传
$_G['member'][videophotostatus] => 视频认证 0未认证 1已认证
$_G['member'][adminid] => 所在管理组ID
$_G['member'][groupid] => 所在用户组ID
$_G['member'][groupexpiry] => 所在用户组有效期
$_G['member'][extgroupids] => 扩展用户组
$_G['member'][regdate] => 注册时间
$_G['member'][credits] => 214 现有总积分
$_G['member'][notifysound] => 短消息声音
$_G['member'][timeoffset] => 所在时区
$_G['member'][newpm] => 新短消息数量
$_G['member'][newprompt] => 新提醒数量
$_G['member'][accessmasks] => 这个貌似访问权限,不确定
$_G['member'][allowadmincp] => 是否拥有管理面板权限 0否 1是
$_G['member'][onlyacceptfriendpm] => 是否只接受好友短消息 0否 1是
$_G['member'][conisbind] => 是否绑定QQ 0否 1是
$_G['member'][lastvisit] => 上次访问时间
);

(4)风格变量篇
$_G['style'] => Array(
$_G['style'][styleid] => 当前风格ID
$_G['style'][name] => 当前风格名
$_G['style'][templateid] => 当前模板体系
$_G['style'][tpldir] => 当前模板目录
$_G['style'][menuhoverbgcolor] => 导航菜单高亮背景颜色
$_G['style'][lightlink] => 浅色链接颜色
$_G['style'][floatbgcolor] => 弹出窗口背景属性
$_G['style'][dropmenubgcolor] => 下拉菜单背景属性$_G['style'][floatmaskbgcolor] => 弹出窗口边框颜色属性
$_G['style'][dropmenuborder] => 下拉菜单边框色
$_G['style'][specialbg] => 彩色区域背景色(帖子用户信息栏、需强调的表头等)
$_G['style'][specialborder] => 彩色区域边框
$_G['style'][commonbg] => 通用显示区域背景颜色
$_G['style'][commonborder] => 通用边框颜色
$_G['style'][inputbg] => 输入框背景色
$_G['style'][inputborderdarkcolor] => 输入框边框深色
$_G['style'][headerbgcolor] => 页头背景
$_G['style'][headerborder] => 页头分割线高度
$_G['style'][sidebgcolor] => 家园侧边背景
$_G['style'][msgfontsize] => 帖子内容字号
$_G['style'][bgcolor] => 页面背景
$_G['style'][noticetext] => 提示信息颜色
$_G['style'][highlightlink] => 高亮链接颜色
$_G['style'][link] => 链接文字颜色
$_G['style'][lighttext] => 浅色文字
$_G['style'][midtext] => 中等文本颜色
$_G['style'][tabletext] => 普通文本颜色
$_G['style'][smfontsize] => 小号字体大小
$_G['style'][threadtitlefont] => 主题列表字体
$_G['style'][threadtitlefontsize] => 主题列表字体大小
$_G['style'][smfont] => 小号字体
$_G['style'][titlebgcolor] => 版块列表标题字体颜色$_G['style'][fontsize] => 正常字体大小
$_G['style'][font] => 正常字体
$_G['style'][styleimgdir] => 扩展图片目录
$_G['style'][imgdir] => 界面基础图片目录
$_G['style'][boardimg] => logo所在路径
$_G['style'][headertext] => 页头文字颜色
$_G['style'][footertext] => 页脚文字颜色
$_G['style'][menubgcolor] => 导航菜单背景颜色
$_G['style'][menutext] => 导航菜单文字颜色
$_G['style'][menuhovertext] => 导航菜单高亮文字颜色
$_G['style'][wrapbg] => 主体表格背景色
$_G['style'][wrapbordercolor] => 主体表格边框色
$_G['style'][contentwidth] => 阅读区域宽度
$_G['style'][contentseparate] => 帖子间隔颜色
$_G['style'][inputborder] => 输入框边框浅色
$_G['style'][menuhoverbgcode] => 导航菜单高亮背景
$_G['style'][floatbgcode] => 弹出窗口背景色
$_G['style'][dropmenubgcode] => 下拉菜单背景色
$_G['style'][floatmaskbgcode] => 弹出窗口边框颜色
$_G['style'][headerbgcode] => 页头背景
$_G['style'][sidebgcode] => 家园侧边栏背景属性
$_G['style'][bgcode] => 全局背景属性属性
$_G['style'][titlebgcode] => 版块列表标题背景$_G['style'][menubgcode] => 导航菜单背景属性
$_G['style'][boardlogo] => LOGO img代码
)</span>
Copy after login

 增加一个更完整的,按字母序列排的

<span ip uid archiver email url md5 php gzip smilies rss id sessions smiles sid></span>
Copy after login
Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The combination of Vue.js and ASP.NET provides tips and suggestions for performance optimization and expansion of web applications. The combination of Vue.js and ASP.NET provides tips and suggestions for performance optimization and expansion of web applications. Jul 29, 2023 pm 05:19 PM

The combination of Vue.js and ASP.NET provides tips and suggestions for performance optimization and expansion of web applications. With the rapid development of web applications, performance optimization has become an indispensable and important task for developers. As a popular front-end framework, Vue.js combined with ASP.NET can help us achieve better performance optimization and expansion. This article will introduce some tips and suggestions, and provide some code examples. 1. Reduce HTTP requests The number of HTTP requests directly affects the loading speed of web applications. pass

Ten ways generative AI will change software development Ten ways generative AI will change software development Mar 11, 2024 pm 12:10 PM

Translator | Reviewed by Chen Jun | Chonglou In the 1990s, when people mentioned software programming, it usually meant choosing an editor, checking the code into the CVS or SVN code base, and then compiling the code into an executable file. Corresponding integrated development environments (IDEs) such as Eclipse and Visual Studio can integrate programming, development, documentation, construction, testing, deployment and other steps into a complete software development life cycle (SDLC), thus improving the work of developers. efficiency. In recent years, popular cloud computing and DevSecOps automation tools have improved developers' comprehensive capabilities, making it easier for more enterprises to develop, deploy and maintain software applications. Today, generative AI is the next generation development

MySQL connection pool usage and optimization techniques in ASP.NET programs MySQL connection pool usage and optimization techniques in ASP.NET programs Jun 30, 2023 pm 11:54 PM

How to correctly use and optimize the MySQL connection pool in ASP.NET programs? Introduction: MySQL is a widely used database management system that features high performance, reliability, and ease of use. In ASP.NET development, using MySQL database for data storage is a common requirement. In order to improve the efficiency and performance of database connections, we need to correctly use and optimize the MySQL connection pool. This article will introduce how to correctly use and optimize the MySQL connection pool in ASP.NET programs.

How to reconnect to MySQL in ASP.NET program? How to reconnect to MySQL in ASP.NET program? Jun 29, 2023 pm 02:21 PM

How to reconnect to MySQL in ASP.NET program? In ASP.NET development, it is very common to use the MySQL database. However, due to network or database server reasons, the database connection may sometimes be interrupted or time out. In this case, in order to ensure the stability and reliability of the program, we need to re-establish the connection after the connection is disconnected. This article will introduce how to reconnect MySQL connections in ASP.NET programs. To reference the necessary namespaces first, reference them at the head of the code file

The combination of Vue.js and ASP.NET enables the development and deployment of enterprise-level applications The combination of Vue.js and ASP.NET enables the development and deployment of enterprise-level applications Jul 29, 2023 pm 02:37 PM

The combination of Vue.js and ASP.NET enables the development and deployment of enterprise-level applications. In today's rapidly developing Internet technology field, the development and deployment of enterprise-level applications has become more and more important. Vue.js and ASP.NET are two technologies widely used in front-end and back-end development. Combining them can bring many advantages to the development and deployment of enterprise-level applications. This article will introduce how to use Vue.js and ASP.NET to develop and deploy enterprise-level applications through code examples. First, we need to install

How to correctly configure and use MySQL connection pool in ASP.NET program? How to correctly configure and use MySQL connection pool in ASP.NET program? Jun 29, 2023 pm 12:56 PM

How to correctly configure and use MySQL connection pool in ASP.NET program? With the development of the Internet and the increase in data volume, the demand for database access and connections is also increasing. In order to improve the performance and stability of the database, connection pooling has become an essential technology. This article mainly introduces how to correctly configure and use the MySQL connection pool in ASP.NET programs to improve the efficiency and response speed of the database. 1. The concept and function of connection pooling. Connection pooling is a technology that reuses database connections. At the beginning of the program,

Using and optimizing transaction performance of MySQL connection pool in ASP.NET Using and optimizing transaction performance of MySQL connection pool in ASP.NET Jun 30, 2023 pm 12:12 PM

How to correctly use and optimize the transaction performance of MySQL connection pool in ASP.NET programs? In ASP.NET programs, database transactions are a very important part. Transactions ensure the consistency and integrity of the database while also providing better performance. When using a MySQL database, it is essential to use connection pools to manage connection resources and optimize performance. First, let us briefly understand the concept of MySQL connection pool. The connection pool is a buffer pool of a group of connections. By pre-initializing a certain number of

What are the built-in objects in aspnet? What are the built-in objects in aspnet? Nov 21, 2023 pm 02:59 PM

The built-in objects in ASP.NET include "Request", "Response", "Session", "Server", "Application", "HttpContext", "Cache", "Trace", "Cookie" and "Server.MapPath": 1. Request, indicating the HTTP request issued by the client; 2. Response: indicating the HTTP response returned by the web server to the client, etc.

See all articles