Jacobb123
08-20-2007, 04:19 AM
I am working with OPENADS and see this bit of code lying around on almost every page but I can't see it defined anywhere and I 'm wondering if this is a predefined variable in PHP if it is I cannot find anything about it. I was hoping that someone could help me out trying to understand this. Here is the code that I am talking about.
$conf = $GLOBALS['_MAX']['CONF'];
Here is the whole code that I am working with or at least this particular page
function MAX_commonGetDeliveryUrl($file = null)
{
$conf = $GLOBALS['_MAX']['CONF'];
if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == $conf['openads']['sslPort']) {
$url = MAX_commonConstructSecureDeliveryUrl($file);
} else {
$url = MAX_commonConstructDeliveryUrl($file);
}
return $url;
}
/**
* A function to generate the URL for delivery scripts.
*
* @param string $file The file name of the delivery script.
* @return string The URL to the delivery script.
*/
function MAX_commonConstructDeliveryUrl($file)
{
$conf = $GLOBALS['_MAX']['CONF'];
return 'http://' . $conf['webpath']['delivery'] . '/' . $file;
}
$conf = $GLOBALS['_MAX']['CONF'];
Here is the whole code that I am working with or at least this particular page
function MAX_commonGetDeliveryUrl($file = null)
{
$conf = $GLOBALS['_MAX']['CONF'];
if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == $conf['openads']['sslPort']) {
$url = MAX_commonConstructSecureDeliveryUrl($file);
} else {
$url = MAX_commonConstructDeliveryUrl($file);
}
return $url;
}
/**
* A function to generate the URL for delivery scripts.
*
* @param string $file The file name of the delivery script.
* @return string The URL to the delivery script.
*/
function MAX_commonConstructDeliveryUrl($file)
{
$conf = $GLOBALS['_MAX']['CONF'];
return 'http://' . $conf['webpath']['delivery'] . '/' . $file;
}