How to Find CodeIgniter Version You are Using?

Hi! In this tutorial we'll see how to find codeigniter version you are using. For pros it may sound basic but would be a challenge for someone getting started with code igniter framework.

A while back I was working in an application built on codeigniter. CI looks like an earlier release but I'm not sure about the exact version of codeigniter the application runs. So I started digging out and found the answer - turns out to be simple like I presumed. And I wish to share here the way I used to find codeigniter version for your reference.

how-to-find-codeigniter-version

Finding Codeigniter Version:


Method 1:

CodeIgniter makes the task easy and stores its current version number in a global constant named 'CI_VERSION'. It is defined in a core file which you can open and check out directly.

Just go to 'system' » 'core' » 'CodeIgniter.php' and look for the lines,



/**
* CodeIgniter Version
*
* @var string
*
*/
define('CI_VERSION', '3.0.0');

Here it is CodeIgniter 3 but may vary depending on the version you use.


Method 2:

Just as an alternate method to check codeigniter version, you can echo the constant value 'CI_VERSION' somewhere in codeigniter controller/view file.



<?php
echo CI_VERSION;
?>

And that should print codeigniter version. Likewise you can easily find codeigniter version you run.

Read Also: How to Submit Form using AJAX in CodeIgniter

Don't Miss: CodeIgniter : Display Query Result in View

0 Response to "How to Find CodeIgniter Version You are Using?"

Posting Komentar