CI_VERSION
$data['version'] = \CodeIgniter\CodeIgniter::CI_VERSION;
<?php echo $version; ?>
(08-05-2020, 06:09 AM)demyr Wrote: This is how I do, maybe there's a shorter way, I don't know. Within your controller use this line, PHP Code:$data['version'] = \CodeIgniter\CodeIgniter::CI_VERSION; And then on your view file call $version : PHP Code:<?php echo $version; ?>
<?php echo \CodeIgniter\CodeIgniter::CI_VERSION;?>
// -----------------------------------------------------------------------/** * Add this to the top of your helper file. * * use CodeIgniter\CodeIgniter; * * USAGE: * <?= ciVersion();?> */if ( ! function_exists('ciVersion')){ /** * ciVersion () * ------------------------------------------------------------------- * * @return string */ function ciVersion() : string { return 'CodeIgniter version: '.CodeIgniter::CI_VERSION; }}
(08-05-2020, 09:25 AM)InsiteFX Wrote: I created a helper for it. PHP Code:// -----------------------------------------------------------------------/** * Add this to the top of your helper file. * * use CodeIgniter\CodeIgniter; * * USAGE: * <?= ciVersion();?> */if ( ! function_exists('ciVersion')){ /** * ciVersion () * ------------------------------------------------------------------- * * @return string */ function ciVersion() : string { return 'CodeIgniter version: '.CodeIgniter::CI_VERSION; }}