yii2如何输出这个配置里的属性 [ 新手入门 ]
如下面的打印代码:
public 'language' => string 'zh-CN' (length=5)
public 'sourceLanguage' => string 'en-US' (length=5)
public 'layout' => string 'main' (length=4)
public 'requestedRoute' => string '' (length=0)
public 'requestedAction' =>
object(yii\base\InlineAction)[53]
public 'actionMethod' => string 'actionIndex' (length=11)
public 'id' => string 'index' (length=5)
public 'controller' =>
object(frontend\controllers\SiteController)[54]
public 'enableCsrfValidation' => boolean true
public 'actionParams' =>
array (size=0)
empty
public 'id' => string 'site' (length=4)
public 'module' =>
&object(yii\web\Application)[3]
public 'defaultAction' => string 'index' (length=5)
public 'layout' => null
public 'action' =>
&object(yii\base\InlineAction)[53]
private '_view' (yii\base\Controller) =>
object(yii\web\View)[49]
public 'assetBundles' =>
array (size=5)
'frontend\assets\AppAsset' =>
object(frontend\assets\AppAsset)[68]
public 'basePath' => string 'D:/www/yii/a/cms/frontend/web' (length=32)
public 'baseUrl' => string '/yii/a/cms/frontend/web/statics/cms' (length=41)
language 可以这样输出:Yii::$app->language
但是
object(frontend\assets\AppAsset)[68]
public 'basePath' => string 'D:/www/yii/a/cms/frontend/web' (length=32)
public 'baseUrl' => string '/yii/a/cms/frontend/web/statics/cms' (length=41)
那basePath怎么可以输出来? 谢谢。
共 2 条回复
jasonyii
注册时间:2015-12-28
最后登录:2016-12-22
在线时长:4小时53分
最后登录:2016-12-22
在线时长:4小时53分
- 粉丝4
- 金钱85
- 威望0
- 积分125