How to create new page in codeigniter?
Answer / Charu Gupta
To create a new page in CodeIgniter, follow these steps:
1. Create a new PHP file for your controller (e.g., welcome.php) inside the 'controllers' folder.
2. Define the class name and extend it from CI_Controller (e.g., class Welcome extends CI_Controller).
3. Create a method to display the view (e.g., function index()).
4. Load the view by using the load() method of the $this object (e.g., $this->load->view('welcome_message', $data)).
5. In your application/views folder, create a new PHP file for the view (e.g., welcome_message.php).
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the latest version of codelgniter? Lists its new features.
What is hooks and how we can configure hooks in codeigniter?
Explain how you will load or add a model in codeigniter?
How do I migrate my existing 'normal' php site to codeigniter?
What is route in codeigniter?
Is codeigniter secure?
How can you create a library in codeigniter?
What are the hooks in codeigniter?
What do you mean by get_instance in codeigniter?
What is hooks in codeigniter?
What is csrf attack in codeigniter?
How to set or get config variables in codeigniter?