Explain how you can extend the class in codeigniter?



Explain how you can extend the class in codeigniter?..

Answer / Sandhi Goel

In CodeIgniter, you can extend a core library, a model, or a controller by creating a new class that extends the base class. Here's an example of extending a controller:
1. Create a new PHP file for your extended controller (e.g., my_controller.php).
2. In the file, define the class and extend the base controller: <?php class MyController extends CI_Controller {n...n}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CodeIgniter Interview Questions

What do you mean by routing in codeigniter?

1 Answers  


How many types of hooks are there in codeigniter?

1 Answers  


What do you mean by get_instance in codeigniter?

1 Answers  


What is_cli() method does in codeigniter?

1 Answers  


Explain views in codeigniter?

1 Answers  


Explain how you can prevent codeigniter from csrf?

1 Answers  


Explain the codeigniter library. How will you load it?

1 Answers  


Can we allowed to call one controller from another controller in codeigniter?

1 Answers  


Explain the codeigniter library.

1 Answers  


Explain routing in codeigniter?

1 Answers  


How to install codeigniter? Explain step by step.

1 Answers  


What are sessions in codeigniter?

1 Answers  


Categories