the problem has been solved, and the answer is given by the downstairs
Fractal boss
"components" => [
"assetManager" => [
"basePath" => "@webroot/asset/", //
"baseUrl" => "@web/asset/", //
],
]
but I tried to add this. It didn"t work. I made changes
."assetManager" => [
"basePath" => "@webroot",
"baseUrl" => "@web",
],
in this way, there will be no problem after adding
< hr > < hr >when I was running a project of a former colleague locally, I encountered this problem:
< hr >
The directory does not exist: C:/phpStudy/PHPTutorial/WWW/freshman/frontend/web/assets
Exception
Invalid Configuration yii\base\InvalidConfigException
The directory does not exist: C:/phpStudy/PHPTutorial/WWW/freshman/frontend/web/assets
I found the location of the file, and his reference code is as follows
use frontend\assets\LqcxMainAsset;
use frontend\assets\IELqcxMainAsset;
LqcxMainAsset::register($this);
IELqcxMainAsset::register($this);
if there is an extra web, there should be something wrong with the routing. After looking for it for a long time, I still can"t find anything wrong.
the suspicion is:
the location of this file is:
\freshman\frontend\themes\freshman\layouts\index-lqcx.php
lend a helping hand to all kinds of heroes! -sharp-sharp-sharp problem description
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)