DISCUZx 模板开发步骤第一步第二步:页面分析第三步 css公共样式修改模块中央电视台修改四:模板标签$_G 保留了 Discuz! 中全部预处理数据缓存能够很好提升程序性能,部分配置数据没必需每次全部查询数据库,只要在修改了时候更新下缓存即可。Discuz! 中全部缓存保留在 $_G[cache] 中baidu 经验:jingyan.baidu.com方法/步骤(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'] => .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] => -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_ 数据表前缀 )...