I have an extension placed under extensions like
extensions myextension style.css script.js
now I want to insert the script and css into the header, and I try to do this for css file:
<link rel="stylesheet" type="text/css" href=" <?php echo Yii::getPathOfAlias('ext.myextension') ?>/style.css" />
but the result path is in back slash, which is not I expected.
<link rel="stylesheet" type="text/css" href="C:\xampp\htdocs\myapp\protected\extensions\myextension/style.css" />
as you can see, there is a problem with the outputed path. can anybody help me with this, how can I get a output link like
also I notice this is an absolute path, which is different from other ones which are relative path like
, how can I get this relative path. thanks a lot.