Welcome Guest, Not a member yet? Register   Sign In
is'this correct? (Load content from a view)
#1

[eluser]ariok[/eluser]
Hi all i got some problems with a simple layout:

I have a controller called "home":

Code:
<?    
class Home extends Controller {
    function index(){
        
    }
    
    function Home() {    
        parent::Controller();
        $this->load->helper('url');
        $this->load->view("main_tpl");
    }
    
    function content()    
    {
        $this->load->view("home_view");
    }    

}
?>

And a view called main_tpl.php..where i have the main template... in center of this template there's this code
Code:
.
        .
        .
        <div id="content">
        &lt;?=$this->content()?&gt;
    </div>
        .
        .
        .


Now... when i load myurl/index.php/home i obtain this error:
Call to undefined method CI_Loader::content() in...etc etc

with $this->content() i want to load function content defined in home.php ..is it correct?? where is my error...

P.s
I test this in my local machine without problem.. putting this code on a unix server i got the error before explained.


Messages In This Thread
is'this correct? (Load content from a view) - by El Forum - 08-05-2007, 10:04 AM
is'this correct? (Load content from a view) - by El Forum - 08-05-2007, 01:46 PM
is'this correct? (Load content from a view) - by El Forum - 08-05-2007, 07:27 PM
is'this correct? (Load content from a view) - by El Forum - 08-06-2007, 03:54 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 04:38 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 04:54 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 05:11 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 05:22 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 05:33 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 05:44 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 05:47 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 05:55 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 06:04 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 06:23 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 06:29 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 06:43 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 07:01 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 07:30 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 07:46 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:07 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:11 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:13 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:26 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:32 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:36 AM
is'this correct? (Load content from a view) - by El Forum - 08-07-2007, 08:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB