本文整理汇总了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');
}
示例2:
function __Construct()
{
parent::__Construct();
$this->load->model('GalleryModel');
// load model
$this->load->library(array('session'));
}
示例3:
function __Construct()
{
parent::__Construct();
$this->load->model('PictureModel');
// load model
$this->load->helper('form');
}
示例4: Programmering
function Programmering()
{
parent::__Construct();
$this->load->library('session');
if ($this->session->userdata('logged') != '1') {
redirect('admin');
}
}
示例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');
}
示例6: redirect
function __construct()
{
parent::__Construct();
$this->load->model('mod_pengajuan', 'model');
if ($this->outh->is_logged_in() == false) {
redirect('login');
}
}
示例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');
}
示例8: __Construct
public function __Construct()
{
parent::__Construct();
$this->outh->restrict();
if ($this->session->userdata('user_level') != 0) {
redirect('dashboard');
}
}
示例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');
}
示例10: redirect
function __construct()
{
parent::__Construct();
$this->load->model('Mod_master', 'model');
if (!$this->outh->is_logged_in()) {
redirect('login');
}
}
示例11: __construct
public function __construct()
{
parent::__Construct();
$this->load->database();
$this->load->model('PagesModel');
$this->load->library('../controllers/auth');
$this->auth->authenticate();
}
示例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');
}
}
示例13: Ads
function Ads()
{
parent::__Construct();
$this->load->library('session');
if ($this->session->userdata('logged') != '1') {
redirect('admin');
}
$this->load->model('adsmodel');
}
示例14: Login
function Login()
{
parent::__Construct();
$this->load->library('session');
$this->load->model('usermodel');
if ($this->session->userdata('logged')) {
redirect('admin/dashboard');
}
}
示例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');
}
}