Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8173023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:59:05+00:00 2026-06-06T21:59:05+00:00

I am working with codeigniter in php and my question is that How can

  • 0

I am working with codeigniter in php and my question is that How can i Call an external controller in a controller located in controllers folder.

    //this file is Controller2.php in controllers folder
class Controller2 extends CI_Controller
{
function one()
   {
      // Some code goes here..
   }
}


//and now this file is Controller1.php which is also in controllers folder


class Controller1 extends CI_Controller
{
   function one()
   {
      // I want to load Controller2 here
   }
}

Please instruct me as i’ve wasted so much time during googling.

Thanks in advance..

Kamran

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:59:08+00:00Added an answer on June 6, 2026 at 9:59 pm

    You can’t, or rather you shouldn’t. Any functionality that you need to use in two different controllers should be moved to a library or helper file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a php(codeigniter) form that sends data to a PDF file when
Currently I am working with a commercial project with PHP. I think this question
Okay so, I'm working with CodeIgniter. posts.php is my view that displays all the
I'm working on a php/codeigniter project and I'm thinking about creating a controller specifically
Install xampp-win32-1.7.3.exe and put my php project in htdocs folder. this is working on
This sql works in phpmyadmin but not working in codeigniter php function getProgramsHomepage(){ $data
I'm working on a CodeIgniter based application. My htacess looks like this: RewriteEngine On
Update: Got this working by disabling CodeIgniter Profiler which was interfering with the Ajax
I have a codeigniter code that is working on local Apache installation. But it
I'm working on a job board in Codeigniter PHP + jQuery where employers enter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.