namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
//$this->assign('aa','测试');
$this->display();
}
public function test(){
$this->assign('aa','测试');
$this->display('index');
}
}
代码无错误,index方法下可以正常显示$aa(这是前提)!可是test方法下display('index')没用,在index.html里面$aa显示不出来..求解答
最佳答案