node.js - nodejs,express搭建,为什么ejs模板被解析成pre了?
PHP中文网
PHP中文网 2017-04-17 16:18:49
0
2
408


最后也没找到任何问题,我只是修改了ejs模板跟静态js,所以很奇怪为什么会这样。最后重装了一次就好了。
这个问题好像大家也没遇到过,所以参考意义不大,请求关闭。

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
刘奇

It should be that something went wrong when you rendered the page. The data was not rendered normally when rendering the page, so the result is that the entire page's html was sent

巴扎黑

Are you reading the file content directly and the ContentType is not set to text/html? If you have directly defined the template engine and directory, just res.rend(‘xxx’); will be fine

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template