本文整理匯總了PHP中CRequest::getUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRequest::getUrl方法的具體用法?PHP CRequest::getUrl怎麽用?PHP CRequest::getUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRequest
的用法示例。
在下文中一共展示了CRequest::getUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setInitData
/**
* 設置基礎數據
*/
public static function setInitData($viewObject)
{
$prefix = CConfig::getInstance()->load('ACTION_PREFIX');
$viewObject->assign('thisUrl', urlencode(CRequest::getUrl()));
$viewObject->assign('base64Url', CEncrypt::safe_b64encode(CRequest::getUrl()));
$viewObject->assign('controller', CRequest::getController());
$viewObject->assign('action', CRequest::getAction());
$viewObject->assign('actionPre', $prefix);
$viewObject->assign('ip', CRequest::getIp());
$viewObject->assign('module', CRequest::getModule());
$viewObject->assign('time', time());
$viewObject->assign('sessionID', session_id());
$viewObject->assign('path', CRequest::getPath());
$viewObject->assign('staticUrl', CConfig::getInstance('site')->load('staticUrl'));
$viewObject->assign('uploadStaticUrl', CConfig::getInstance('site')->load('uploadStaticUrl'));
$viewObject->assign('siteName', CConfig::getInstance('site')->load('siteName'));
}