新的问题又来了

浏览:377 发布日期:2017/06/14 分类:求助交流
今天花了很久很久的时间,终于搞清怎么显示模板,好吧,我刚刚放心去吃饭,回来建了个模板,$this->fetch(),biang,模板源代码出来了,我日 ,默认return配置是html啊,为啥给我显示源代码!!!

问题补充:
$this->assign('name','php');
1 return $this->fetch();
2 return $this->display();
3 return view('index',['name'=>'php']);

这三种方式我都试了,
结果1,3,显示html源码
结果2,显示string ""
无论哪个结果,模板变量都不变,原样输出
最佳答案
评论( 相关
后面还有条评论,点击查看>>