Dirk
Dirk

Reputation: 6884

Which version of CodeIgniter am I currently using?

Quick question.

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

Thanks.

Upvotes: 245

Views: 178795

Answers (7)

Nooha Haris
Nooha Haris

Reputation: 41

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

Upvotes: 4

Gilles Bossuyt
Gilles Bossuyt

Reputation: 131

For CodeIgniter 4, use the following:

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

Upvotes: 3

Kishor Pant
Kishor Pant

Reputation: 146

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


Upvotes: 6

Timo
Timo

Reputation: 3217

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

define('CI_VERSION', '3.1.8');

Upvotes: 125

Anish Rai
Anish Rai

Reputation: 676

You should try :

<?php
echo CI_VERSION;
?>

Or check the file system/core/CodeIgniter.php

Upvotes: 15

user6749930
user6749930

Reputation:

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

<?php
   echo CI_VERSION;
?>

Upvotes: 5

Colin Brock
Colin Brock

Reputation: 21565

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

Upvotes: 369

Related Questions