drupal 7全局变量

drupal 7全局变量是drupal开发过程中很重要的参考api.尽快的了解它们,方便我们在drupal站点开发中恰当的使用这些变量。

名称位置描述
$active_dbdeveloper/globals.phpActive database connection.
$base_pathdeveloper/globals.phpThe base path of the drupal installation. At least will default to /.
$base_rootdeveloper/globals.phpThe root URL of the host excludes the path.
$base_theme_infodeveloper/globals.phpAn array of objects that reperesent the base theme. For documentation of the
theme object see _init_theme().
$base_urldeveloper/globals.phpThe base URL of the drupal installation.
$channeldeveloper/globals.phpAn associative array containing title, link, description and other keys.
The link should be an absolute URL.
$conf./authorize.php 
$confdeveloper/globals.phpArray of persistent variables stored in 'variable' table.
$cookie_domaindeveloper/globals.phpThe domain to be used form session cookies.
$custom_themedeveloper/globals.phpName of custom theme to override default theme.
$db_prefixdeveloper/globals.phpThe prefix to be placed on all database tables.
$db_typedeveloper/globals.phpThe type of database being used.
$db_urldeveloper/globals.phpThe url of the database. Thorough documentation provided in default.settings.php.
$elementdeveloper/globals.phpStructured array describing the data to be rendered.
$forum_topic_list_headerdeveloper/globals.phpAn array of topic header information.
$iddeveloper/globals.phpActive statistics record id.
$imagedeveloper/globals.phpCurrent image tag used by aggregator.
$installed_profiledeveloper/globals.phpThe name of the profile that has just been installed.
$install_localedeveloper/globals.phpThe locale to use during installation
$itemdeveloper/globals.phpGeneral string or array.
$itemsdeveloper/globals.phpArray of items used by aggregator.
$languagedeveloper/globals.phpAn object containing the information for the active language.
$last_resultdeveloper/globals.phpResource of the query executed.
$menu_admindeveloper/globals.phpBoolean indicating that a menu administrator is running the menu access check.
$multibytedeveloper/globals.phpThe current multibyte mode.
Possible values: UNICODE_ERROR, UNICODE_SINGLEBYTE, UNICODE_MULTIBYTE.
$niddeveloper/globals.phpActive blog node id.
$pager_page_arraydeveloper/globals.phpResult of pager_query() that is utilized by other functions.
$pager_totaldeveloper/globals.phpArray of the total number of pages per pager. The key is will be 0 by defualt, but
can be specified via the $element parameter of pager_query().
$pager_total_itemsdeveloper/globals.phpArray of the total number of items per pager. The key is will be 0 by defualt, but
can be specified via the $element parameter of pager_query().
$profiledeveloper/globals.phpThe name of the currently installed profile.
$queriesdeveloper/globals.phpArray of queries that have been executed.
$recent_activitydeveloper/globals.phpRecent activity statistics generated by statistics_exit().
$tagdeveloper/globals.phpActive tag name.
$themedeveloper/globals.phpName of the active theme.
$theme_enginedeveloper/globals.phpThe active theme engine related to the active theme.
$theme_infodeveloper/globals.phpActive theme object. For documentation of the theme object see _init_theme().
$theme_keydeveloper/globals.phpName of the active theme.
$theme_pathdeveloper/globals.phpPath to the active theme.
$timersdeveloper/globals.phpStores timers that have been created by timer_start().
$update_free_accessdeveloper/globals.phpAccess control for update.php script. Allows the update.phpscript to be run when
not logged in as and administrator.
$update_modedeveloper/globals.phpDisabled caling hook_boot() and hook_exit() during the update process (update.php) since
the database is in a largely unknown state.
$usermodules/php/php.module 
$userdeveloper/globals.phpRepresentation of the current user. Stores preferences and other user information.
$xrds_current_servicedeveloper/globals.phpArray used by XRDS XML parser for OpenID to track parsing state.
$xrds_open_elementsdeveloper/globals.phpArray used by XRDS XML parser for OpenID to track parsing state.
$xrds_servicesdeveloper/globals.phpArray used by XRDS XML parser for OpenID to track parsing state.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值