Method 1: CodeIgniter makes the task easy and stores its current version number in a global constant named 'public const CI_VERSION'. It is defined in a core file that you can open and check out directly, just go to root_folder/vendor/codeigniter/framework/system/Codeigniter. php and look for the lines.
CodeIgniter 4 is the latest version of the framework, intended for use with PHP 7.3+ (including 8.1). The initial release was February 24, 2020. The current version is v4.2.3.
Now that the stable version has been officially launched it is time to start creating the projects and take advantage of all that CodeIgniter 4 can offer in terms of performance and productivity in the web application development process.
Yes, the constant CI_VERSION
will give you the current CodeIgniter version number. It's defined in: /system/codeigniter/CodeIgniter.php As of CodeIgniter 2, it's defined in /system/core/CodeIgniter.php
For example,
echo CI_VERSION; // echoes something like 1.7.1
Look for define
in system/core/CodeIgniter.php
:
define('CI_VERSION', '3.1.8');
You should try :
<?php
echo CI_VERSION;
?>
Or check the file system/core/CodeIgniter.php
From a controller or view - use the following to display the version:
<?php
echo CI_VERSION;
?>
you can easily find the current CodeIgniter version by
echo CI_VERSION
or you can navigate to System->core->codeigniter.php file and you can see the constant
/**
* CodeIgniter Version
*
* @var string
*
*/
const CI_VERSION = '3.1.6';
Please check the file "system/core/CodeIgniter.php". It is defined in const CI_VERSION = '3.1.10';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With