本文整理汇总了PHP中CI_Controller::Controller方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Controller::Controller方法的具体用法?PHP CI_Controller::Controller怎么用?PHP CI_Controller::Controller使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CI_Controller
的用法示例。
在下文中一共展示了CI_Controller::Controller方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
parent::Controller();
$this->load->library('form_validation');
$this->load->model('users', 'user1');
$this->load->model('sys_email', 'sysemail');
date_default_timezone_set(SYS_TIMEZONE);
}
示例2: __construct
public function __construct()
{
parent::__construct();
parent::Controller();
$this->load->model('sys_email', 'sysemail');
$this->load->model('class_mod', 'classobj');
date_default_timezone_set(SYS_TIMEZONE);
$this->myschool = $this->session->userdata('schoolinfo');
}
示例3: __construct
public function __construct()
{
parent::Controller();
//parent::__construct(); //for CI 2.x users
$this->load->helper('ckeditor');
//Ckeditor's configuration
$this->data['ckeditor'] = array('id' => 'content', 'path' => 'js/ckeditor', 'config' => array('toolbar' => "Full", 'width' => "550px", 'height' => '100px'), 'styles' => array('style 1' => array('name' => 'Blue Title', 'element' => 'h2', 'styles' => array('color' => 'Blue', 'font-weight' => 'bold')), 'style 2' => array('name' => 'Red Title', 'element' => 'h2', 'styles' => array('color' => 'Red', 'font-weight' => 'bold', 'text-decoration' => 'underline'))));
$this->data['ckeditor_2'] = array('id' => 'content_2', 'path' => 'js/ckeditor', 'config' => array('width' => "550px", 'height' => '100px', 'toolbar' => array(array('Bold', 'Italic'), array('Underline', 'Strike', 'FontSize'), array('Smiley'), '/')), 'styles' => array('style 3' => array('name' => 'Green Title', 'element' => 'h3', 'styles' => array('color' => 'Green', 'font-weight' => 'bold'))));
}
示例4: redirect
function __construct()
{
parent::Controller();
$this->iontank_auth_auth->logged_in() or redirect('/admin/auth/login');
$this->tank_auth->is_admin() or redirect('admin');
$this->tank_auth->is_admin() or die(1);
$this->load->library('migrations');
$this->migrations->set_verbose(TRUE);
/** VERY IMPORTANT - only turn this on when you need it. */
show_error('Access to this controller is blocked, turn me on when you need me.');
}
示例5: redirect
function __construct()
{
parent::Controller();
$this->load->helper('menu');
$this->load->model('member');
$this->load->model('account');
$this->load->library('session');
$this->load->helper('url');
$this->load->helper('danish_date');
$this->load->helper('date');
if (!intval($this->session->userdata('id')) > 0) {
redirect(base_url() . 'index.php/logind');
}
$permissions = $this->session->userdata('permissions');
if (!isset($permissions['credit']) || $permissions['credit'] < 2) {
redirect(base_url() . 'index.php/logud');
}
}
示例6: Welcome
/**
* 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 Welcome()
{
parent::Controller();
}
示例7:
function MY_Controller()
{
parent::Controller();
$this->global_data['Mymenu'] = $this->menu;
// other common stuff; for example you may want a global cart, login/logout, etc.
}
示例8: Upload
function Upload()
{
parent::Controller();
}
示例9:
function MY_AuthController()
{
parent::Controller();
}
示例10: Upload
function Upload()
{
parent::Controller();
$this->load->helper(array('form', 'url'));
}
示例11:
function _construct()
{
parent::Controller();
}
示例12:
function _consturct()
{
parent::Controller();
$this->load->model('tmhs');
}
示例14:
function __construct()
{
parent::Controller();
$this->is_logged_in();
}