Get started with CodeIgniter 4

By: Luis A. Sierra


CodeIgniter is an open-source web framework that is used for rapid web development. CodeIgniter follows the MVC (Model-View-Controller) architectural pattern. It is noted for its speed compared to other PHP web frameworks.

Before proceeding on this tutorial, you must have an environment already setup to run and install CodeIgniter 4. 


1 - go to app -> Views and then create a file name greetings.php


2 - open the file greetings.php with your favorite editor and then add this code:

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> div { margin-bottom: 15px; padding: 4px 12px; } .danger { background-color: #ffdddd; border-left: 6px solid #f44336; } .success { background-color: #ddffdd; border-left: 6px solid #04AA6D; } .info { background-color: #e7f3fe; border-left: 6px solid #2196F3; } .warning { background-color: #ffffcc; border-left: 6px solid #ffeb3b; } </style> </head> <body> <h2>Get started</h2> <div class="success"> <p><strong>Welcome</strong> to CodeIgniter 4</p> </div> <div class="info"> <p>I'm <strong>Luis A. Sierra</strong></p> </div> </body> </html>

3 - Now go to app -> Controllers and then open the file name Home.php and replace welcome_message by greetings


4 - Now go to http://localhost:8080/



Congratulations 😎👏

Post a Comment

Previous Post Next Post