Teacher Zhu, I have difficulties importing templates. Please guide me!
(1) Directly copy the index.HTML of the template to the specified directory. When running on the browser, what appears is not the content of the new Index.HTML, but the last used <h2> I am. . . The content of the template </h2>. Although I deleted the previous index.html file. No way, I copied the index.html content into a new index.html file. At this time the content of the template is displayed.
(2) According to the method in the video, I copied the lib and static files to the specified location. After completing the corresponding replacements, the normal page display still did not appear, indicating that the template resources were not accurately introduced. I followed the instructions in the video. Is there anything else I need to set up?
Your first question: thinkphp has template caching. This is a configuration problem. I don’t have your source code, so I guess it is a template caching problem.
Check the page template configuration in the manual and see how to remove the template cache.
The second question: the static and lib directories should be placed in the public directory. When introducing, please note that there is a difference between /static/ and static/. you try.
You can also use www.xx.com/static/1.png, your own domain name, and access it directly to see if you can access it.