如何识别 php 源代码的 CodeIgniter 版本



如何识别 php 源代码的 CodeIgniter 版本?

/**<br>
 * CodeIgniter<br>
 *<br>
 * An open source application development framework for PHP<br>
 *<br>
 * This content is released under the MIT License (MIT)<br>
 *<br>
 * Copyright (c) 2014 - 2016, British Columbia Institute of Technology<br>
 *<br>
 * Permission is hereby granted, free of charge, to any person obtaining a copy<br>
 * of this software and associated documentation files (the "Software"), to deal<br>
 * in the Software without restriction, including without limitation the rights<br>
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br>
 * copies of the Software, and to permit persons to whom the Software is<br>
 * furnished to do so, subject to the following conditions:<br>
 *<br>
 * The above copyright notice and this permission notice shall be included in<br>
 * all copies or substantial portions of the Software.<br>
 *<br>
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.<br>
 *<br>
 * @package CodeIgniter<br>
 * @author  EllisLab Dev Team<br>
 * @copyright   Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)<br>
 * @copyright   Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)<br>
 * @license http://opensource.org/licenses/MIT  MIT License<br>
 * @link    https://codeigniter.com<br>
 * @since   Version 1.0.0  <---- THIS IS THE VERSION or WHAT??<br>
 * @filesource<br>
 */

谢谢你非常匹配!

定义了一个常量来确定/system/core/Codeigniter.php中的版本

define('CI_VERSION', 'x.xx')

Codeigniter的当前版本在 system/core/CodeIgniter.php 中定义。

您可以使用以下方法获取当前版本:

echo CI_VERSION;//outputs your current CI's version

对于查看代码点火器版本,您必须编写此代码

 <?php
      echo CI_VERSION;
 ?>
 

或者您可以检查文件system/core/CodeIgniter.php

对于检查代码点火器版本,您必须编写此代码

 <?php
      echo CI_VERSION;
 ?>

或者您可以检查文件system/core/CodeIgniter.php对于版本 3.xx

和检查文件 system/CodeIgniter.php 对于版本 4.xx

最新更新