Thinkphp6, static static resource access path problem

In thinkphp, the public directory is an externally accessible resource directory. Unlike the 3rd and 5th editions, the 6th version of thinkphp accesses static resources without capitalization and without underlining.

1. Resources are placed under the public / static folder:

Insert picture description here
My server root directory:
Insert picture description here
Resource link path in html: / thinkphp directory / public / static / ...
Insert picture description here
2. Change the server root directory: at this time public becomes my root directory
Insert picture description here
and then the project in the path The name / public is removed, and my static resource bootstrap.css can still be accessed.
Insert picture description here
Of course, there is a simpler way, which is to use the absolute path directly.

Guess you like

Origin www.cnblogs.com/taoxiaoyao/p/12735071.html