After the module group, you cannot access the template page. The project directory structure is as follows:
The content in IndexAction. class. php is as follows:
// This class is automatically generated by the system for testing purposes only
Class IndexAction extends Action {
Public function index (){
Header ("Content-Type: text/html; charset = utf-8 ");
Echo 'admin ';
$ This-> display('a.html ');
}
}
The access path is as follows:
Http: // localhost/secondtrade/index. php/Admin/Index/index
Reply to discussion (solution)
7.1 Template definition
To manage template files more effectively, ThinkPHP classifies template files into directories. the default template file definition rules are as follows:
Template directory/[group name/] [template topic/] module name/operation name + template suffix
The template directory is the Tpl under the project by default. when a group is defined, the subdirectories are separated by the group name. The new template topic is empty by default (indicating that the template topic function is not enabled ), the template topic function is designed to switch between multiple templates. if there are multiple template themes, you can use the DEFAULT_THEME parameter to set the default template topic name.
Under each template topic, the project module is named directory, and then the specific operation template file of each module, for example:
The template file corresponding to the add operation of the User module should be: Tpl/User/add.html
The suffix of the template file is .html. you can also configure it as another one through TMPL_TEMPLATE_SUFFIX.
If the project enables the module grouping function (assuming that the User module belongs to the Home group), the default template file may be Tpl/Home/User/add.html.
Of course, the group function also provides the TMPL_FILE_DEPR parameter to simplify the directory hierarchy of the template.
For example, if TMPL_FILE_DEPR is configured as "_", the default template file is changed:
Tpl/Home/User_add.html
Because the system has such a rule for automatic identification of template files, the common display method can output the corresponding template without any parameters.
The location of your template file is incorrect.
So how should we put it? Please answer...
Template directory/[group name/] [template topic/] module name/operation name + template suffix