Home > PHP Framework > ThinkPHP > body text

TP5 camel case naming templates must use underscores!

藏色散人
Release: 2020-08-05 11:31:35
forward
3453 people have browsed it

The following tutorial column will introduce to you about the use of underscores in tp5 camel case naming templates. I hope it will be helpful to friends in need!

Note: If our controller file is named in camel case, you need to use underscores to access the

TP5 camel case naming templates must use underscores!

template directory structure, also That is, in "Module/view/Controller/Operation", you need to write the "Controller" directory name in the naming format of "lowercase underscore" in order to access the template file normally.

1. Define a class file named in CamelCase

2. When accessing the URL, directly enter CamelCase to access it. Then an error is reported

TP5 camel case naming templates must use underscores!

3. Solution: Use underscore mode to access

TP5 camel case naming templates must use underscores!

The above is the detailed content of TP5 camel case naming templates must use underscores!. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
tp5
source:kancloud.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!