How To Check Codeigniter Application Version, On Which We Are Working?

18-Sep-2021

.

Admin

How To Check Codeigniter Application Version, On Which We Are Working?

Hi guys,

Today i will explained How To Check Codeigniter Application Version, On Which We Are Working?. This example is so easy to use in Codeigniter 4.

This tutorial answers a fundamental question. How to find out the Codeigniter application’s version, on which we are working on.

So let's start to the example.

Check Codeigniter Version Example


Basically, there are two ways through which you can reach to your destination.

Codeigniter is a robust and noted framework that creates coherence with developers. The compendium of files is very well documented, and it stores its version in global const `CI_VERSION` in the following

app/vendor/codeigniter/framework/system/Codeigniter.php file.

You can open this file and search for “The current version of CodeIgniter Framework” line of text within the Codeigniter class. Below you will see the version of codeigniter somewhere between the line number 63.

class CodeIgniter

{

/**

* The current version of CodeIgniter Framework

*/

const CI_VERSION = '4.0.4';

}

The Relentless Way

This method is pretty simple and straightforward; developer’s love this way. Just open your view template and define the below code it will print out the Codeigniter version in one go.

<?php

echo \CodeIgniter\CodeIgniter::CI_VERSION;

?>

We are creating this tutorial considering Codeigniter 4, if you want to check the find out the app version in Codeigniter 3 then use the below line of code.

<?php

echo CI_VERSION;

?>

So, these were the methods through which you can display and check the CodeIgniter app version that you are working on.

Now you can check your own.

I hope it can help you...

#Codeigniter 4

#Codeigniter