本文整理汇总了PHP中CUrl::removeArgument方法的典型用法代码示例。如果您正苦于以下问题:PHP CUrl::removeArgument方法的具体用法?PHP CUrl::removeArgument怎么用?PHP CUrl::removeArgument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUrl
的用法示例。
在下文中一共展示了CUrl::removeArgument方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContextUrl
/**
* Creates new CUrl object based on giver URL (or $_REQUEST if null is given),
* and adds/removes parameters based on current page context.
*
* @param string $sourceUrl
*
* @return CUrl
*/
public static function getContextUrl($sourceUrl = null)
{
$config = self::resolveConfig();
$url = new CUrl($sourceUrl);
if (isset($config['remove'])) {
foreach ($config['remove'] as $key) {
$url->removeArgument($key);
}
}
if (isset($config['add'])) {
foreach ($config['add'] as $key) {
$url->setArgument($key, getRequest($key));
}
}
return $url;
}
示例2: function
$result = CFavorite::remove('web.favorite.graphids', $_REQUEST['favid'], $_REQUEST['favobj']);
if ($result) {
echo '$("addrm_fav").title = "' . _('Add to favourites') . '";' . "\n";
echo '$("addrm_fav").onclick = function() { add2favorites("graphid", "' . $_REQUEST['favid'] . '"); }' . "\n";
}
}
$result = DBend($result);
if ($page['type'] == PAGE_TYPE_JS && $result) {
echo 'switchElementClass("addrm_fav", "iconminus", "iconplus");';
}
}
}
if (!empty($_REQUEST['period']) || !empty($_REQUEST['stime'])) {
CScreenBase::calculateTime(array('profileIdx' => 'web.screens', 'profileIdx2' => $pageFilter->graphid, 'updateProfile' => true, 'period' => getRequest('period'), 'stime' => getRequest('stime')));
$curl = new CUrl();
$curl->removeArgument('period');
$curl->removeArgument('stime');
ob_end_clean();
DBstart();
CProfile::flush();
DBend();
redirect($curl->getUrl());
}
ob_end_flush();
if ($page['type'] == PAGE_TYPE_JS || $page['type'] == PAGE_TYPE_HTML_BLOCK) {
require_once dirname(__FILE__) . '/include/page_footer.php';
exit;
}
/*
* Display
*/