php 我在哪里可以找到我的 yii 应用程序的 yii 版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10900770/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 23:18:31  来源:igfitidea点击:

Where can i find the yii version of my yii app?

phpyii

提问by user1077220

I recently started to work with yii, where can i find the yii version of my yii app?

我最近开始使用 yii,在哪里可以找到 yii 应用程序的 yii 版本?

回答by bool.dev

You can use getVersion()of YiiBase

你可以使用getVersion()YiiBase

Yii::getVersion();

回答by Aldo Bassanini

In Linux, run ./yii in the base directory. In Windows, run yii.bat. You will get something like:

在 Linux 中,在基本目录中运行 ./yii。在 Windows 中,运行yii.bat. 你会得到类似的东西:

./yii

This is Yii version 2.0.3.

The following commands are available:
[...]

回答by Mehul Patel

From the framework folder and file "YiiBase.php". Find the function : getVersion()

从框架文件夹和文件“YiiBase.php”。找到函数:getVersion()

回答by Ramesh Kotkar

Add following line after require_once ($yii); in the index file

在 require_once ($yii) 之后添加以下行;在索引文件中

echo Yii::getVersion();

回答by PeterG

grep -A 5 getVersion framework/YiiBase.php

grep -A 5 getVersion 框架/YiiBase.php

回答by Biju s

You Can find Yii Version in CHANGELOG - file In YII Install folder

您可以在 CHANGELOG - 文件中找到 Yii 版本在 YII 安装文件夹中