I want to have a class that checks input on all the controllers that I specified. Codeigniter version is 2.1.0, and I have php 5.3.10
Here's how I installed it: I look at http://ellislab.com/codeigniter/user_guide/general/core_classes.html and I configured it as follows: in the file / application / core / MY _Main.php
class MY_Main extends CI_Controller { function __construct() { parent::__construct(); } }
In my controller, I have welcome.php
?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Welcome extends MY_Main { function __construct() { parent::__construct(); } public function index() { $this->load->view('welcome_message'); } }
So, if I put the login in MY-Main, it should get the job, but I can't get it to work for anyone.
source share