How to call function from Controller to include into the View page with Codeigniter? |
[eluser]Unknown[/eluser]
I want to call function from Controller to include into the View page with Codeigniter. Usually when I open any page, I call $this->load->view() in Controller for open that page. Now I want to include sub page into main page, but it can't include any function in View. I try to include function like this. Code: <body><? include(site_url().'/login'); ?></body> I can open page with this link http://localhost/ci_house/index.php/login. but when I open main page for run my code it show these error. Quote: A PHP Error was encountered I want to show 2 view in 1 page . Code: function test1() In views/main.php: Code: $this->load->view('test1'); I want to show like Code: <body> |
Welcome Guest, Not a member yet? Register Sign In |