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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -