本文整理匯總了PHP中add::redirect方法的典型用法代碼示例。如果您正苦於以下問題:PHP add::redirect方法的具體用法?PHP add::redirect怎麽用?PHP add::redirect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類add
的用法示例。
在下文中一共展示了add::redirect方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: process_mode_login
/**
* Login
*
* @param array $gpc - contains $gpc['username'] and $gpc['password']
*
*/
public function process_mode_login($gpc)
{
# validation on controller
if (empty($gpc['username'])) {
throw new e_user_input("Blank username");
}
if (empty($gpc['password'])) {
throw new e_user_input("Blank password");
}
# login the session user class
if (member::login($gpc['username'], $gpc['password']) instanceof member) {
add::redirect(add::config()->path);
}
}
示例2: redirect_query
/**
* void redirect_query(array $new_query,bool $merge_current=true)
* redirects to the new query string, die()s in the process
* @param array $new_query
* @param boolean $merge_current true to include current $_GET with $new_query
* @todo support string on $new_query
* @uses redirect()
*/
function redirect_query($new_query, $merge_current = true)
{
if ($merge_current) {
$get = $_GET;
unset($get['add_mvc_path']);
$query = array_merge($get, $new_query);
} else {
$query = $new_query;
}
return add::redirect("?" . http_build_query($query));
}
示例3: redirect
/**
* Redirect
*
* @since ADD MVC 0.5
*/
public function redirect()
{
add::redirect(add::config()->path . self::path());
}
示例4: redirect
/**
* Redirect
*
* @since ADD MVC 0.5
*/
public function redirect()
{
add::redirect(self::path());
}
示例5: login_redirect
/**
* login_redirect()
* extend to change
* @since ADD MVC 0.0
*/
static function login_redirect()
{
add::redirect(add::config()->path . static::LOGIN_PAGE . "?redirect=" . urlencode($_SERVER['REQUEST_URI']));
}
示例6: login_redirect
/**
* login_redirect()
*
* @since ADD MVC 0.0
*/
static function login_redirect()
{
add::redirect(add::config()->path . 'login?redirect=' . urlencode($_SERVER['REQUEST_URI']));
}
示例7: login_redirect
static function login_redirect()
{
return add::redirect(static::login_href());
}
示例8: redirect
/**
* Redirect function
* die() included
* @param string $url the href to redirect into
* todo do not die when failed to rediredct
*
* @deprecated see add::redirect()
*/
function redirect($url)
{
trigger_error("Deprecated redirect function", E_USER_DEPRECATED);
add::redirect($url);
}