Which version of CodeIgniter am I currently using?

2019-01-29 23:11发布

问题:

Quick question.

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

Thanks.

回答1:

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


回答2:

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

define('CI_VERSION', '3.1.8');


回答3:

You should try :

<?php
echo CI_VERSION;
?>

Or check the file system/core/CodeIgniter.php



回答4:

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

<?php
   echo CI_VERSION;
?>