When a project was recently deployed to a Linux server, it was found that some of the templates had an error saying "template does not exist:/application/admin/..."
Check the file on the server, there is no missing files, upload files to the server again, or error. Inexplicably, suspicion is a code problem.
After careful examination, the file name of the template is found to be a problem:
The use of TP is known: thinkphp will be in $this->display (), will automatically get the method name as a template file name, such as a GetUserInfo method to use the getuserinfo.html template file.
For the method in the controller, I use the hump nomenclature, and the template name in the view layer is also used in the Hump naming method. For example, the GetUserInfo method corresponds to the getuserinfo.html template file, but! Thinkphp in $this->display (), read the method name as a template name, read out the method name is lowercase, that is, the template name is required to getuserinfo.html.
In Windows without distinguishing between filenames, Linux distinguishes, so it complains.
Workaround: Either change the template file name to lowercase or $this->display (' template filename ') (without. html).
Details determine success or failure, I hope this article can really help everyone, thank you for your reading.