国外设计欣赏网站 - DOOOOR.com

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,微信登陆

搜索

[Drupal问题] Drupal7 & Drupal6全局变量列表对比

[复制链接]
发表于 1-17-2012 19:51 | 显示全部楼层 |阅读模式

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 indefault.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 bystatistics_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; e: L7 y4 m4 J3 m, O$ y* \5 S1 F timer multiple times, the measured intervals will be accumulated." class="local" style="color: rgb(0, 113, 179); text-decoration: none; ">timer_start().
$update_free_accessdeveloper/globals.phpAccess control for update.php script. Allows the update.php script to be run when
not logged in as and administrator.
$update_modedeveloper/globals.phpDisabled caling hook_boot() andhook_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.




drupal 6全局变量

名称sort icon位置描述
$active_dbdeveloper/ globals.phpActive database connection. See alsodb_set_active()
$base_pathdeveloper/ globals.phpThe base path of the drupal installation. At least will default to /. See alsoconf_init()
$base_rootdeveloper/ globals.phpThe root URL of the host excludes the path. See alsoconf_init()
$base_theme_infodeveloper/ globals.phpAn array of objects that reperesent the base theme. For documentation of the theme object see_init_theme(). See also_init_theme()
$base_urldeveloper/ globals.phpThe base URL of the drupal installation. See alsoconf_init()
$channeldeveloper/ globals.phpAn associative array containing title, link, description and other keys. The link should be an absolute URL. See alsoaggregator_element_start()
$confdeveloper/ globals.phpThe path to the configuration directory as set byconf_path().
$cookie_domaindeveloper/ globals.phpThe domain to be used form session cookies.
$custom_themedeveloper/ globals.phpName of custom theme to override default theme. See alsoinit_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. See alsoaggregator_element_start()
$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 See alsost()
$itemdeveloper/ globals.phpGeneral string or array. See alsoaggregator_element_start()
$itemsdeveloper/ globals.phpArray of items used by aggregator. See alsoaggregator_element_start()
$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 bystatistics_exit().
$tagdeveloper/ globals.phpActive tag name. See alsoaggregator_element_start()
$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(). See also_init_theme()
$theme_keydeveloper/ globals.phpName of the active theme. See alsoinit_theme()
$theme_pathdeveloper/ globals.phpPath to the active theme.
$timersdeveloper/ globals.phpStores timers that have been created by timer_start(). See alsotimer_start()
$update_free_accessdeveloper/ globals.phpAccess control for update.php script. Allows theupdate.php script 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. See alsodrupal_goto()
$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.

感谢似曾相识!

|2011-2026-版权声明|平台(网站)公约|DOOOOR 设计网 ( 吉ICP备2022003869号 )

GMT+8, 2-21-2025 07:01 , Processed in 2.061454 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表