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