Which version of CodeIgniter am I currently using?

PhpCodeigniter

Php Problem Overview


Quick question.

Is there something similar to a phpinfo() - that would display the version for CodeIgniter?

Thanks.

Php Solutions


Solution 1 - Php

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

Solution 2 - Php

Look for define in system/core/CodeIgniter.php:

define('CI_VERSION', '3.1.8');

Solution 3 - Php

You should try :

<?php
echo CI_VERSION;
?>

Or check the file system/core/CodeIgniter.php

Solution 4 - Php

From a controller or view - use the following to display the version:

<?php
   echo CI_VERSION;
?>

Solution 5 - Php

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';

Solution 6 - Php

Please check the file "system/core/CodeIgniter.php". It is defined in const CI_VERSION = '3.1.10';

Solution 7 - Php

For CodeIgniter 4, use the following:

<?php    
    echo \CodeIgniter\CodeIgniter::CI_VERSION;
?>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDirkView Question on Stackoverflow
Solution 1 - PhpColin BrockView Answer on Stackoverflow
Solution 2 - PhpTimoView Answer on Stackoverflow
Solution 3 - PhpAnish RaiView Answer on Stackoverflow
Solution 4 - Phpuser6749930View Answer on Stackoverflow
Solution 5 - PhpKishor PantView Answer on Stackoverflow
Solution 6 - PhpNooha HarisView Answer on Stackoverflow
Solution 7 - PhpGilles BossuytView Answer on Stackoverflow