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


PHP CI_Controller::__Construct方法代碼示例

本文整理匯總了PHP中CI_Controller::__Construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP CI_Controller::__Construct方法的具體用法?PHP CI_Controller::__Construct怎麽用?PHP CI_Controller::__Construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CI_Controller的用法示例。


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

示例1: __Construct

 public function __Construct()
 {
     parent::__Construct();
     $this->load->database();
     $this->load->model('ConfirmModel');
     $this->load->model('UsersModel');
 }
開發者ID:nikolaybyivanov,項目名稱:RG-Intern,代碼行數:7,代碼來源:confirm.php

示例2:

 function __Construct()
 {
     parent::__Construct();
     $this->load->model('GalleryModel');
     // load model
     $this->load->library(array('session'));
 }
開發者ID:RTougjas,項目名稱:TP2015,代碼行數:7,代碼來源:Gallery.php

示例3:

 function __Construct()
 {
     parent::__Construct();
     $this->load->model('PictureModel');
     // load model
     $this->load->helper('form');
 }
開發者ID:RTougjas,項目名稱:TP2015,代碼行數:7,代碼來源:Picture.php

示例4: Programmering

 function Programmering()
 {
     parent::__Construct();
     $this->load->library('session');
     if ($this->session->userdata('logged') != '1') {
         redirect('admin');
     }
 }
開發者ID:baltedewit,項目名稱:slogo-playout-server,代碼行數:8,代碼來源:scheduling.php

示例5:

 function __Construct()
 {
     parent::__Construct();
     $this->load->model(array('EditModel', 'upload_model', 'GalleryModel', 'Profile_model'));
     // load model
     $this->load->helper(array('form', 'url'));
     $this->load->library('form_validation');
 }
開發者ID:RTougjas,項目名稱:TP2015,代碼行數:8,代碼來源:Edit.php

示例6: redirect

 function __construct()
 {
     parent::__Construct();
     $this->load->model('mod_pengajuan', 'model');
     if ($this->outh->is_logged_in() == false) {
         redirect('login');
     }
 }
開發者ID:sabbana,項目名稱:new,代碼行數:8,代碼來源:pengajuan.php

示例7:

 function __construct()
 {
     parent::__Construct();
     $this->load->model(array('MenuModel'));
     $this->load->library(array('form_validation'));
     $this->form_validation->set_error_delimiters('<div class="alert alert-danger" role="alert">', '</div>');
     $this->load->helper('language');
 }
開發者ID:RTougjas,項目名稱:pws,代碼行數:8,代碼來源:FrontPage.php

示例8: __Construct

 public function __Construct()
 {
     parent::__Construct();
     $this->outh->restrict();
     if ($this->session->userdata('user_level') != 0) {
         redirect('dashboard');
     }
 }
開發者ID:sabbana,項目名稱:new,代碼行數:8,代碼來源:mycron.php

示例9:

 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 function __Construct()
 {
     parent::__Construct();
     $this->load->database();
     // load database
     //form validation
     $this->load->library('form_validation');
 }
開發者ID:vrushalrt,項目名稱:EXATASK1,代碼行數:23,代碼來源:Welcome.php

示例10: redirect

 function __construct()
 {
     parent::__Construct();
     $this->load->model('Mod_master', 'model');
     if (!$this->outh->is_logged_in()) {
         redirect('login');
     }
 }
開發者ID:sabbana,項目名稱:new,代碼行數:8,代碼來源:master.php

示例11: __construct

 public function __construct()
 {
     parent::__Construct();
     $this->load->database();
     $this->load->model('PagesModel');
     $this->load->library('../controllers/auth');
     $this->auth->authenticate();
 }
開發者ID:nikolaybyivanov,項目名稱:RG-Intern,代碼行數:8,代碼來源:pages.php

示例12: redirect

 function __Construct()
 {
     parent::__Construct();
     $this->load->library('form_validation');
     $this->load->model('Mod_profile');
     if ($this->outh->is_logged_in() == false) {
         redirect('login');
     }
 }
開發者ID:sabbana,項目名稱:new,代碼行數:9,代碼來源:profile.php

示例13: Ads

 function Ads()
 {
     parent::__Construct();
     $this->load->library('session');
     if ($this->session->userdata('logged') != '1') {
         redirect('admin');
     }
     $this->load->model('adsmodel');
 }
開發者ID:baltedewit,項目名稱:slogo-playout-server,代碼行數:9,代碼來源:ads.php

示例14: Login

 function Login()
 {
     parent::__Construct();
     $this->load->library('session');
     $this->load->model('usermodel');
     if ($this->session->userdata('logged')) {
         redirect('admin/dashboard');
     }
 }
開發者ID:baltedewit,項目名稱:slogo-playout-server,代碼行數:9,代碼來源:login.php

示例15: __Construct

 public function __Construct()
 {
     parent::__Construct();
     $this->load->database();
     $this->load->model('UsersModel');
     $this->load->model('ConfirmModel');
     if (!$this->session->userdata('is_admin')) {
         redirect('user');
     }
 }
開發者ID:nikolaybyivanov,項目名稱:RG-Intern,代碼行數:10,代碼來源:admin.php


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