How can I call two controller one afetr another in codeigniter -


We need to load two controllers from one controller class.

The source is like this: -

  Public function index () {/ ** twitter feed to Twitter controller ** / $ this- & gt; Load - & gt; Controller ('twitter', 'twitter_controller'); $ Data ['twitter_feed'] = $ this- & gt; Twitter_controller-> Fatch ALL (); Echo '& lt; Pre & gt; '; Print_r ($ data ['twitter_feed']); Echo & lt; / Pre & gt; '; / ** Loading news controller to get the latest news ** / $ this- & gt; Load-> Controller ('News', 'News Controller'); $ Data ['news'] = $ this- & gt; News_controller-> Get_latest_news ();   

The Twitter controller is loading, but the news controller is not able to load.

Please help !!

Thanks

  Redirect ("Controller_name / function_name", / div> 

"refresh"); // This code is using PHP's header function, this base_arle + 1 parameter is simple

Hope this will help you

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -