为了账号安全,请及时绑定邮箱和手机立即绑定

tp5使用view()在insert.php渲染视图失败,但是在index.php倒是可以渲染insert.html

tp5使用view()在insert.php渲染视图失败,但是在index.php倒是可以渲染insert.html

慕虎5492763 2019-12-02 11:34:10
insert页面的代码<?php   namespace app\index\controller;use think\Controller;use think\View;class Insert {      public function insert()    {        echo "这是一个insert页面";        return view('insert',[            'email' => '1',            'user'  => 'aaa'        ]);      } } <?php   index.php的代码namespace app\index\controller;use think\Controller;use think\Db;class Index{       public function index()    {        return view('insert');     } } ?>    
查看完整描述

1 回答

?
SilvesterLi

TA贡献1条经验 获得超0个赞

你先把application/config.php 里的debug改为true

查看完整回答
反对 回复 2019-12-03
  • 1 回答
  • 0 关注
  • 1399 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信