最新回答 / 捂著鼻子說不臭
需要在views目錄下創(chuàng)建對應(yīng)的index.php與about.php,還有看自己控制器有沒有public $layout = 'common';以及操作的有沒有返回值。return $this->render('index');或return $this->render('about');
2016-06-08
最贊回答 / 天王星wj
你的控制器名字和打開后的名字不一樣,內(nèi)部應(yīng)該是 class HelloController extends Controller{}或者 把那個HelloController改成HomeController.
2016-04-20
最贊回答 / 臺農(nóng)一號
你檢查一下你修改的文件<h1><?=$view_hello_str;?></h1>的index.php是不是basic/views/hello/index.php ;如果是basic/views/index.php這個文件 ? 則無法輸出你想要的效果
2016-03-28
已采納回答 / wd_828
$test是前面查詢的一個結(jié)果,是一個數(shù)組,數(shù)組中的元素就是test對象,可以使用asArray讓數(shù)組中元素都轉(zhuǎn)為數(shù)組。對象:<...code...>數(shù)組:<...code...>
2016-03-27