我有一个view,在另外的地方,如:e:/otherviews/test.php
在controller中$this->render(‘e:/otherviews/test.php’);竟然说找不到视图,请问如何渲染绝对路径的视图
我有一个view,在另外的地方,如:e:/otherviews/test.php
在controller中$this->render(‘e:/otherviews/test.php’);竟然说找不到视图,请问如何渲染绝对路径的视图
有没有必要在CAction添加一个render方法,类似widget,默认可以渲染当中路径中views下的视图
没有什么意义吧
你需要用path alias。如果没有,就用Yii::setPathOfAlias()声明一个。