鍍金池/ 問答/PHP/ TP5.1怎么使用視圖模版呢 我這個報錯了

TP5.1怎么使用視圖模版呢 我這個報錯了

這是項目目錄
圖片描述

路由這么寫的Route::get('/test', 'index/test/test');

下面是控制器test.php

<?php
namespace app\index\controller;
use think\Controller;
use think\request;
use think\response;
use think\View;
class Test extends Controller
{
    public function test(){
        return $this->fetch();
    }
}

我想把test視圖模版顯示出來應(yīng)該怎么辦呢 我這樣試了一下報錯了
圖片描述

回答
編輯回答
念初

圖片描述

斜杠 用對了嗎

2018年3月30日 07:16
編輯回答
夢囈

路徑明顯跟你文件夾合不上得嘛,在view下面建test目錄再建test.html

2017年7月10日 05:03