當前位置: 首頁>>代碼示例>>PHP>>正文


PHP add::redirect方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:20,代碼來源:ctrl_page_login.class.php

示例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));
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:19,代碼來源:add.class.php

示例3: redirect

 /**
  * Redirect
  *
  * @since ADD MVC 0.5
  */
 public function redirect()
 {
     add::redirect(add::config()->path . self::path());
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:9,代碼來源:ctrl_tpl_page.class.php

示例4: redirect

 /**
  * Redirect
  *
  * @since ADD MVC 0.5
  */
 public function redirect()
 {
     add::redirect(self::path());
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:9,代碼來源:ctrl_tpl_page.class.php

示例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']));
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:9,代碼來源:model_auth.class.php

示例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']));
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:9,代碼來源:member.class.php

示例7: login_redirect

 static function login_redirect()
 {
     return add::redirect(static::login_href());
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:4,代碼來源:ldap_member.class.php

示例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);
}
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:13,代碼來源:common.functions.php


注:本文中的add::redirect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。