Get the version codeIgniter

Created at 29-Aug-2022 , By samar

Get the version codeIgniter

In this tutorial, we will try to find the solution to "Get the version codeIgniter" through programming.

Create a view file under views directory (app\Views\) and place code \CodeIgniter\CodeIgniter::CI_VERSION; in it and visit the route URL to get the version of codeIgniter.
  • Get the version of codeigniter 4

    app\Views\<welcome_message>.php

    File name may be different if you created a new file.

    <?=  
        \CodeIgniter\CodeIgniter::CI_VERSION; 
    ?>
    

    To define route place code in Routes.php file under /app/Config directory.

    $routes->get('/', 'Home::index');
    

    Controller's code in Home.php file under /app/Controllers directory.

    <?php
    
    namespace App\Controllers;
    
    class Home extends BaseController
    {
    	public function index()
    	{
    		return view('welcome_message');
    	}
    }
    

Back to code snippet queries related codeIgniter

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.