I encountered a strange phenomenon today when I was working on a project with tp. When I introduced the css file into the template, it actually prompted the message "Unable to load module" that the wooden block does not exist.
The specific code is as follows:
<code class="HTML"> <link href="__STATIC__/css/bootstrap.min.css" rel="stylesheet" /> <link id="bootstrap-rtl-link" href="" rel="stylesheet" /> <link href="__STATIC__/css/font-awesome.min.css" rel="stylesheet" /> <link href="__STATIC__/css/tree/treedefault.css" rel="stylesheet" /> <link href="__STATIC__/css/tree/treetable.css" rel="stylesheet" /></code>
Here comes the strange place:
Above picture:
Error reason:
But the css file exists:
For __STATIC__ path:
I just don’t understand why the above ones can be introduced successfully, but these two cannot be introduced? (○´・д・)ノ
Add one more code in the runtime. There are no two pieces of code in the runtime
@yangxiangming, the path to directly output it is like this
End this post, the reason has been found. Yes, I don’t know why those two css files suddenly disappeared. I pulled it again and it's fine now. I was careless and didn't notice this problem (but the screenshot I took contains 2 files /(ㄒoㄒ)/~~) When was it deleted? Here’s the final rendering. Thank you to all the great sf guys
I encountered a strange phenomenon today when I was working on a project with tp. When I introduced the css file into the template, it actually prompted the message "Unable to load module" that the wooden block does not exist.
The specific code is as follows:
<code class="HTML"> <link href="__STATIC__/css/bootstrap.min.css" rel="stylesheet" /> <link id="bootstrap-rtl-link" href="" rel="stylesheet" /> <link href="__STATIC__/css/font-awesome.min.css" rel="stylesheet" /> <link href="__STATIC__/css/tree/treedefault.css" rel="stylesheet" /> <link href="__STATIC__/css/tree/treetable.css" rel="stylesheet" /></code>
Here comes the strange place:
Picture above:
Error reason:
But the css file exists:
For __STATIC__ path:
I just don’t understand why the above ones can be introduced successfully, but these two cannot be introduced? (○´・д・)ノ
Add one more code in the runtime. There are no two pieces of code in the runtime
@yangxiangming, the path to directly output it is like this
End this post, the reason has been found. Yes, I don’t know why those two css files suddenly disappeared. I pulled it again and it's fine now. I was careless and didn't notice this problem (but the screenshot I took contains 2 files /(ㄒoㄒ)/~~) When was it deleted? Here’s the final rendering. Thank you to all the great sf guys
Thank you for the invitation. I looked at your code
and I really can’t see anything wrong! Have a look at the output debugging
<code>//直接输出看看。看看是什么地址,然后直接通过浏览加载看看能访问吧 __STATIC__/css/tree/treedefault.css __STATIC__/css/tree/treetable.css</code>
Look at the files generated in runtime and see that part of the code.
Your two CSS requests are regarded as accessing the tree method in the css controller in the Static module.
If you are using an apache server, you need to determine whether the file exists in .htaccess, and then forward it to index.php.
Because your file path was written incorrectly, the request reported 404, and your nginx forwards all requests to index.php by default.
There will be a link that does not exist and will be taken over by php. TP will query the corresponding controller according to the requested path, and the controller does not exist.
This is not tp’s problem.