I use the Yii structure and have a CSS file that uses some images for background and the like.
Another PHP code might use Yii :: app () -> request-> baseUrl to prefix the resources with the correct path. However, the css file is not PHP, so I cannot use this code.
I tried relative paths, but the same css file is accessed using html pages of different depths, for example:
http://mysite/controller/action1/10 http://mysite/controller
therefore, relative paths do not work (at least not in all browsers).
Is there some Yii way to do this, or should I just use absolute paths and do with it?
Milan Babuškov
source share