$view = new View();
return $view ->fetch('./hello');
我渲染模版,路径正确,结果没有当作HTML来解析而是在文档前加了PRE标签,把整个视图当作字符串来输出,hello.html是视图文件,是不是哪里少了什么参数?
"<!DOCTYPE html>\r\n<!--\r\nTo change this license header, choose License Headers in Project Properties.\r\nTo change this template file, choose Tools | Templates\r\nand open the template in the editor.\r\n-->\r\n<html>\r\n <head>\r\n <ti
tle>这就是我<\/title>\r\n <meta charset=\"UTF-8\">\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n <\/head>\r\n <body>\r\n <div>I LIKE IT<\/div>\r\n <\/body>\r\n<\/html>\r\n"[/code][code]