本文整理汇总了PHP中icms::urls方法的典型用法代码示例。如果您正苦于以下问题:PHP icms::urls方法的具体用法?PHP icms::urls怎么用?PHP icms::urls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类icms
的用法示例。
在下文中一共展示了icms::urls方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildRelevantUrls
/**
* Build URLs for global use throughout the application
* @return array
*/
protected static function buildRelevantUrls()
{
if (!self::$urls) {
$http = strpos(ICMS_URL, "https://") === false ? "http://" : "https://";
$phpself = $_SERVER['SCRIPT_NAME'];
$httphost = $_SERVER['HTTP_HOST'];
$querystring = $_SERVER['QUERY_STRING'];
if ($querystring != '') {
$querystring = '?' . $querystring;
}
$currenturl = $http . $httphost . $phpself . $querystring;
self::$urls = array();
self::$urls['http'] = $http;
self::$urls['httphost'] = $httphost;
self::$urls['phpself'] = $phpself;
self::$urls['querystring'] = $querystring;
self::$urls['full_phpself'] = $http . $httphost . $phpself;
self::$urls['full'] = $currenturl;
$previouspage = '';
if (array_key_exists('HTTP_REFERER', $_SERVER) && isset($_SERVER['HTTP_REFERER'])) {
self::$urls['previouspage'] = $_SERVER['HTTP_REFERER'];
}
//self::$urls['isHomePage'] = (ICMS_URL . "/index.php") == ($http . $httphost . $phpself);
}
return self::$urls;
}