discuz 全局变量$_G详解
$_G全局变量详解,变量定义路径:soucre/class/discuz/discuz_application.php(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( => 2011-9-26 21:07 当前服务器时间 => +8 当前服务器时区)$_G['config'] => Array($_G['config'] => Array($_G['config'] => Array(
$_G['config'] => localhost 数据库连接地址
$_G['config'] => root 数据库用户名
$_G['config'] => 123456 数据库密码
$_G['config'] => utf8 数据库编码
$_G['config'] => 0
$_G['config'] => dxutf 数据库名
$_G['config'] => pre_ 数据表前缀
)
))(2) 全局后台各项设置篇$_G['setting'] => 全局-站点信息-网站名称$_G['setting'] => 全局-站点信息-网站URL$_G['setting'] => 全局-注册访问-注册-注册地址$_G['setting'] => 全局-注册访问-注册-注册链接文字$_G['setting'] => 全局-注册访问-注册-新用户注册验证$_G['setting'] => 全局-站点信息-网站备案信息代码$_G['setting'] => 全局-上传设置-基本设置-图片处理库类型$_G['setting'] => 积分情况 自行打印$_G['setting'] => 全局-积分设置-基本设置-总积分计算公式$_G['setting'] => 全局-性能优化-论坛页面缓存设置-缓存论坛首页有效期$_G['setting'] => 全局-性能优化-论坛页面缓存设置-缓存目录$_G['setting'] => 全局-性能优化-论坛页面缓存设置-缓存帖子有效期$_G['setting'] => 全局-注册访问-注册-网站服务条款$_G['setting'] => 全局-站点信息-站点名称$_G['setting'] => 全局-上传设置-基本设置-本地附件URL地址$_G['setting'] => 全局-上传设置-基本设置-本地附件保存位置$_G['setting'] => 界面-界面设置-全局-匿名用户的昵称$_G['setting'] => 界面-界面设置-主题列表-置顶主题的标识$_G['setting'] => 默认首页文件名forum.php$_G['setting'] => 用户-认证设置$_G['setting'] => 后台伪静态规则情况$_G['setting'] => UCenter地址$_G['setting'] => 后台插件设置与启用情况$_G['setting'] => 后台界面设置-导航设置-内置导航的logo组$_G['setting'] => 后台设置的导航情况,主要用于导航判断$_G['setting'] => 页头导航数组,可参考此数组进行页头导航重写$_G['setting'] => 页尾导航$_G['setting'] => 家园模块左侧导航$_G['setting'] => 页头导航右边快捷导航按钮内容$_G['setting'] => 页头顶部导航内容$_G['setting'] => Array 版块主题封面($_G['setting']=> 主题封面宽度$_G['setting']=> 主题封面高度)$_G['setting'] => 全局-站点功能-活动主题-发起者必填信息$_G['setting'] => 全局-站点功能-活动主题-扩展资料项数量$_G['setting'] => 全局-站点功能-活动主题-用户列表每页显示参与活动的人数$_G['setting'] => 全局-站点功能-活动主题-使用积分$_G['setting'] => 全局-站点功能-活动主题-内置类型$_G['setting'] => 全局-站点信息-管理员邮箱(3)全局当前登录者信息篇$_G['member'] => Array 当前登录用户个人信息($_G['member'] => UID$_G['member'] => 邮箱地址$_G['member'] => 用户名$_G['member'] => 经过MD5后的密码(别乱输出!!!切记)$_G['member'] => 用户是否已经删除$_G['member'] => 邮箱验证状态 0未验证 1验证通过$_G['member'] => 头像上传状态 0未上传 1已上传$_G['member'] => 视频认证 0未认证 1已认证$_G['member'] => 所在管理组ID$_G['member'] => 所在用户组ID$_G['member'] => 所在用户组有效期$_G['member'] => 扩展用户组$_G['member'] => 注册时间$_G['member'] => 214 现有总积分$_G['member'] => 短消息声音$_G['member'] => 所在时区$_G['member'] => 新短消息数量$_G['member'] => 新提醒数量$_G['member'] => 这个貌似访问权限,不确定$_G['member'] => 是否拥有管理面板权限 0否 1是$_G['member'] => 是否只接受好友短消息 0否 1是$_G['member'] => 是否绑定QQ 0否 1是$_G['member'] => 上次访问时间);(4)风格变量篇$_G['style'] => Array($_G['style'] => 当前风格ID$_G['style'] => 当前风格名$_G['style'] => 当前模板体系$_G['style'] => 当前模板目录$_G['style'] => 导航菜单高亮背景颜色$_G['style'] => 浅色链接颜色$_G['style'] => 弹出窗口背景属性$_G['style'] => 下拉菜单背景属性$_G['style'] => 弹出窗口边框颜色属性$_G['style'] => 下拉菜单边框色$_G['style'] => 彩色区域背景色(帖子用户信息栏、需强调的表头等)$_G['style'] => 彩色区域边框$_G['style'] => 通用显示区域背景颜色$_G['style'] => 通用边框颜色$_G['style'] => 输入框背景色$_G['style'] => 输入框边框深色$_G['style'] => 页头背景$_G['style'] => 页头分割线高度$_G['style'] => 家园侧边背景$_G['style'] => 帖子内容字号$_G['style'] => 页面背景$_G['style'] => 提示信息颜色$_G['style'] => 高亮链接颜色$_G['style'] => 链接文字颜色$_G['style'] => 浅色文字$_G['style'] => 中等文本颜色$_G['style'] => 普通文本颜色$_G['style'] => 小号字体大小$_G['style'] => 主题列表字体$_G['style'] => 主题列表字体大小$_G['style'] => 小号字体$_G['style'] => 版块列表标题字体颜色$_G['style'] => 正常字体大小$_G['style'] => 正常字体$_G['style'] => 扩展图片目录$_G['style'] => 界面基础图片目录$_G['style'] => logo所在路径$_G['style'] => 页头文字颜色$_G['style'] => 页脚文字颜色$_G['style'] => 导航菜单背景颜色$_G['style'] => 导航菜单文字颜色$_G['style'] => 导航菜单高亮文字颜色$_G['style'] => 主体表格背景色$_G['style'] => 主体表格边框色$_G['style'] => 阅读区域宽度$_G['style'] => 帖子间隔颜色$_G['style'] => 输入框边框浅色$_G['style'] => 导航菜单高亮背景$_G['style'] => 弹出窗口背景色$_G['style'] => 下拉菜单背景色$_G['style'] => 弹出窗口边框颜色$_G['style'] => 页头背景$_G['style'] => 家园侧边栏背景属性$_G['style'] => 全局背景属性属性$_G['style'] => 版块列表标题背景$_G['style'] => 导航菜单背景属性$_G['style'] => LOGO img代码
页:
[1]