Welcome Guest, Not a member yet? Register   Sign In
Base Controller Redirect
#9

[eluser]Kyle Ellman[/eluser]
Here is the base controller my_controller.php
Code:
<?php

class MY_Controller extends Controller
{
    function __construct()
    {
        parent::Controller();
        
        //redirect('');
    }
}


And here is the controller that extends MY_Controller, media.php
Code:
<?php

class Media extends MY_controller {

    function __construct()
    {
        parent::__construct();
        
        $this->load->helper('form');
        $this->load->helper('url');
    }
    
    function index()
    {
        $this->load->view('welcome');
    }
    
    function show()
    {
        $this->load->view('media_list');
    }
    
    function add()
    {
        $this->load->view('media_add');
    }
}

If I uncomment the redirect(''); line, I don't get an actual error, just the blank browser screen you get as a result of syntax errors, but I'm pretty sure that it's not a syntax error.

NOTE: It's always redirecting for now because I haven't coded the authentication portions yet.


Messages In This Thread
Base Controller Redirect - by El Forum - 04-06-2010, 02:01 PM
Base Controller Redirect - by El Forum - 04-06-2010, 02:55 PM
Base Controller Redirect - by El Forum - 04-06-2010, 03:02 PM
Base Controller Redirect - by El Forum - 04-07-2010, 01:08 AM
Base Controller Redirect - by El Forum - 04-07-2010, 01:37 AM
Base Controller Redirect - by El Forum - 04-07-2010, 06:46 AM
Base Controller Redirect - by El Forum - 04-07-2010, 07:38 AM
Base Controller Redirect - by El Forum - 04-07-2010, 07:39 AM
Base Controller Redirect - by El Forum - 04-07-2010, 07:43 AM
Base Controller Redirect - by El Forum - 04-07-2010, 07:46 AM
Base Controller Redirect - by El Forum - 04-07-2010, 07:56 AM
Base Controller Redirect - by El Forum - 04-07-2010, 09:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB