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


PHP Error404函數代碼示例

本文整理匯總了PHP中Error404函數的典型用法代碼示例。如果您正苦於以下問題:PHP Error404函數的具體用法?PHP Error404怎麽用?PHP Error404使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Error404函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: load_nickname

 protected static function load_nickname($id = null)
 {
     if (!$id) {
         $id = $_GET['id'];
     }
     $nickname = BadNickname::find_by_id($id);
     if ($nickname) {
         return $nickname;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:badnickname.controller.php

示例2: load_slideshow

 protected static function load_slideshow($id = null)
 {
     if (!$id) {
         $id = $_GET['id'];
     }
     $slideshow = Slideshow::find_by_id($id);
     if ($slideshow) {
         return $slideshow;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:slideshow.controller.php

示例3: load_group

 protected static function load_group($id = null)
 {
     if (isset($_GET['id'])) {
         $id = $_GET['id'];
     }
     $id = mysql_real_escape_string($id);
     $group = Group::find_by_id($id);
     if ($group) {
         return $group;
     }
     Error404();
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:group.controller.php

示例4: load_gameserver

 protected function load_gameserver($id = null)
 {
     if (!$id) {
         $id = $_GET['id'];
     }
     $id = mysql_real_escape_string($id);
     $server = GameServer::find_by_id($id);
     if ($server && $server->online) {
         return $server;
     }
     Error404();
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:gameserver.controller.php

示例5: load_content

 protected static function load_content($permalink = null, $external_only = false)
 {
     if (!$permalink) {
         $permalink = $_GET['permalink'];
     }
     $content = Content::find_by_permalink($permalink, $external_only);
     if ($content) {
         return $content;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:content.controller.php

示例6: load_game

 protected static function load_game($id = null)
 {
     if (!$id) {
         $id = mysql_real_escape_string($_GET['game_id']);
     }
     $game = Game::find_by_id($id);
     if ($game) {
         return $game;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:gametype.controller.php

示例7: load_event

 protected static function load_event($permalink = null)
 {
     if (!$permalink) {
         $permalink = $_GET['permalink'];
     }
     $event = Event::find_by_permalink($permalink);
     if ($event) {
         return $event;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:event_group.controller.php

示例8: load_gameserver

 protected static function load_gameserver($id = null)
 {
     if (!$id) {
         $id = $_GET['id'];
     }
     $server = GameServer::find_by_id($id);
     if ($server) {
         return $server;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:gameserver.controller.php

示例9: load_user

 protected function load_user($nickname = null)
 {
     if (!$nickname) {
         $nickname = $this->GetData('nickname');
     }
     $user = User::find_by_nickname($nickname);
     if ($user) {
         return $user;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:affiliate_referral.controller.php

示例10: load_tag

 protected static function load_tag($tagname = null)
 {
     if (!$tagname) {
         $tagname = $_GET['tag'];
     }
     $tag = Tag::find_by_permalink($tagname);
     if ($tag) {
         return $tag;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:12,代碼來源:news.controller.php

示例11: UfuInit

/**
 * Инициализация ЧПУ и разбор текущего адреса страницы.
 * @since 1.4.1
 */
function UfuInit()
{
    if (System::config('general/ufu')) {
        if (isset($_GET['ufu'])) {
            $Path = trim($_GET['ufu']);
            if ($Path != '') {
                $_GET = UfuRewrite($_GET['ufu']);
                if ($_GET === false) {
                    Error404();
                }
            }
        }
    }
}
開發者ID:agnyrussia,項目名稱:linkorcms_mod_forms_file_support,代碼行數:18,代碼來源:ufu.php

示例12: load_event

 protected static function load_event($permalink = null)
 {
     if (!$permalink) {
         $permalink = $_GET['permalink'];
     }
     $event = Event::find_by_permalink($permalink);
     if ($event) {
         if (!$event->visible && !$event->advertised) {
             //self::restrict("admin");
             throw new Error404();
         }
         if (!$event->check_user(Site::CurrentUser())) {
             Error404();
         }
         return $event;
     } else {
         Error404();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:19,代碼來源:event.controller.php

示例13: show

 public function show($id = null)
 {
     if (isset($_GET['id'])) {
         $id = $_GET['id'];
     }
     $script = Script::find_by_id($id);
     if (!$script) {
         Error404();
     }
     $page = 1;
     if (isset($_GET['page'])) {
         $page = $_GET['page'];
     }
     $id = mysql_real_escape_string($script->id);
     $paginate = ScriptLog::paginate("scripts.id = '{$id}'", "scriptlogs.created_at DESC, scriptlogs.id DESC", $page, 50);
     $this->assign("page", $paginate);
     $this->assign("script", $script);
     $this->title = "Scheduled Scripts :: {$script->name} :: Logs";
     $this->render("scriptlog/show.tpl");
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:20,代碼來源:scriptlog.controller.php

示例14: show

 public function show($id = null)
 {
     if (isset($_GET['id'])) {
         $id = $_GET['id'];
     }
     if (!$id) {
         Error404();
     }
     $payment = PaymentTransaction::find_by_id($id);
     if (!$payment) {
         Error404();
     }
     $cart = Cart::find_by_id($payment->cart_id);
     if ($cart) {
         $user = User::find_by_id($cart->user_id);
         $this->assign("user", $user);
         $this->assign("cart", $cart);
     }
     $this->assign("payment", $payment);
     $this->title = "Payment {$payment->id}";
     $this->render("paymenttransaction/show.tpl");
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:22,代碼來源:paymenttransaction.controller.php

示例15: process

 public function process($id = null)
 {
     if ($_GET['key'] == md5("winbarmint")) {
         if (!$id) {
             $id = mysql_real_escape_string($_GET['id']);
         }
         $topup = Topup::find_by_id($id);
         if ($topup) {
             $topup->processed = true;
             if ($topup->save()) {
                 echo "OK";
             } else {
                 echo "Fail";
             }
             die;
         } else {
             Error404();
         }
     } else {
         Error403();
     }
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:22,代碼來源:topup.controller.php


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