本文整理汇总了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);
}