Yii::$app->version获取不到 [ 2.0 版本 ]
调用Yii::$app->version时,报错:
exception 'yii\base\UnknownPropertyException' with message 'Getting unknown property: yii\web\Application::version' in D:\www\work\api\v1\vendor\yiisoft\yii2\base\Component.php:147
Stack trace:
#0 D:\www\work\api\v1\vendor\yiisoft\yii2\di\ServiceLocator.php(75): yii\base\Component->get('version')
#1 D:\www\work\api\v1\mobile\modules\v1\controllers\SharesController.php(143): yii\di\ServiceLocator->get('version')
#2 [internal function]: mobile\modules\v1\controllers\SharesController->actionRobotShares()
#3 D:\www\work\api\v1\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#4 D:\www\work\api\v1\common\component\Controller.php(154): yii\base\InlineAction->runWithParams(Array)
#5 D:\www\work\api\v1\common\component\Module.php(454): yii\base\Controller->runAction('robot_shares', Array)
#6 D:\www\work\api\v1\vendor\yiisoft\yii2\web\Application.php(102): yii\base\Module->runAction('v1/shares/robot...', Array)
#7 D:\www\work\api\v1\vendor\yiisoft\yii2\base\Application.php(380): yii\web\Application->handleRequest(Object(yii\web\Request))
#8 D:\www\work\api\v1\mobile\web\index.php(21): yii\base\Application->run()
#9 {main}
最佳答案
其他 0 个回答
2716xzw 杭州
最后登录:2018-04-26
在线时长:5小时28分
- 粉丝3
- 金钱60
- 威望0
- 积分110