Please tell me about the view template path.
张超
张超 2019-08-12 23:36:03
0
1
1333

When I used the teacher's code to practice, the same code and path were used, but the system prompted the template "template file does not exist". The following path is the view folder under the TP project, not the view folder under the application. Moreover, the view class folder has been changed to lowercase and underlined. The official manual also writes the path under the tp project. I would like to ask the teacher, is this an additional configuration in your course? Or is it caused by other reasons. How should I configure it correctly? Thank you for your reply.

Error message: Template file does not exist: C:\myphp_www\PHPTutorial\WWW\tp\view\index\view_test\demo1.html

张超
张超

reply all(1)
张超

I just saw View::fetch() under the template rendering module of "ThinkPHP6.0 Complete Development Manual (Official Edition)" on the php Chinese website. If the parameter is empty, the default template path is: Currently Application/view/current controller name (lowercase + underline)/current operation.html, , but in the official manual it is /view/application name/controller name (lowercase + underline) )/operation name.html, it seems that the template has been updated.

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