首页上一页 1 下一页尾页 1 条记录 1/1页
GLOBAL关键词 在函数外部使用起何作用?
发表在PHP图书答疑
2012-02-22
是否精华
是
否
版块置顶:
是
否
我知道GLOBAL用在函数中是引用函数外全局变量,如果在函数外引用的全局变量是在哪里声明的? adodb.inc.php文件开头截取的代码:
<?php
if (!defined('_ADODB_LAYER')) {
define('_ADODB_LAYER',1);
//==============================================================================================
// CONSTANT DEFINITIONS
//==============================================================================================
/**
* Set ADODB_DIR to the directory where this file resides...
* This constant was formerly called $ADODB_RootPath
*/
if (!defined('ADODB_DIR')) define('ADODB_DIR',dirname(__FILE__));
//==============================================================================================
// GLOBAL VARIABLES
//==============================================================================================
[font color=#FF0000]GLOBAL
[/font][font color=#00FF00]$ADODB_vers,[/font] // database version
$ADODB_COUNTRECS, // count number of records returned - slows down query
$ADODB_CACHE_DIR, // directory to cache recordsets
$ADODB_EXTENSION, // ADODB extension installed
$ADODB_COMPAT_FETCH, // If $ADODB_COUNTRECS and this is true, $rs->fields is available on EOF
$ADODB_FETCH_MODE, // DEFAULT, NUM, ASSOC or BOTH. Default follows native driver default...
$ADODB_QUOTE_FIELDNAMES; // Allows you to force quotes (backticks) around field names in
......
......
<?php
if (!defined('_ADODB_LAYER')) {
define('_ADODB_LAYER',1);
//==============================================================================================
// CONSTANT DEFINITIONS
//==============================================================================================
/**
* Set ADODB_DIR to the directory where this file resides...
* This constant was formerly called $ADODB_RootPath
*/
if (!defined('ADODB_DIR')) define('ADODB_DIR',dirname(__FILE__));
//==============================================================================================
// GLOBAL VARIABLES
//==============================================================================================
[font color=#FF0000]GLOBAL
[/font][font color=#00FF00]$ADODB_vers,[/font] // database version
$ADODB_COUNTRECS, // count number of records returned - slows down query
$ADODB_CACHE_DIR, // directory to cache recordsets
$ADODB_EXTENSION, // ADODB extension installed
$ADODB_COMPAT_FETCH, // If $ADODB_COUNTRECS and this is true, $rs->fields is available on EOF
$ADODB_FETCH_MODE, // DEFAULT, NUM, ASSOC or BOTH. Default follows native driver default...
$ADODB_QUOTE_FIELDNAMES; // Allows you to force quotes (backticks) around field names in
......
......