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

时间:2017-02-07 15:17:19

标签: 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>
 */

谢谢你非常匹配!

3 个答案:

答案 0 :(得分:1)

有一个常量定义,用于确定/system/core/Codeigniter.php

中的版本
define('CI_VERSION', 'x.xx')

答案 1 :(得分:1)

当前版本的Codeignitersystem/core/CodeIgniter.php中定义。

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

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

答案 2 :(得分:0)

要查看codeigniter版本,您必须编写此代码

 <?php
      echo CI_VERSION;
 ?>
 

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