Welcome Guest, Not a member yet? Register   Sign In
Why construct function creates issue in codeigniter 3
#1

I am new to codeigniter 3.x, in codeigniter 3.x when i write

class Auth extends CI_Controller {

    public function __construct() {
        parent::__construct();
        echo "ya";
    }
}
it shows me error

404 Page Not Found

The page you requested was not found.
and when i write

class Auth extends CI_Controller {

    public function __construct() {
        parent::__construct();
        echo "ya";
    }
    public function index() {
        echo "aya";exit;
    }
}
it works fine and shows output as {yaaya}. can anyone let me know y is this?
Reply


Messages In This Thread
Why construct function creates issue in codeigniter 3 - by NorahDaniels - 11-10-2022, 09:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB