How to get url addres for my asset file?

Hi, does anyone know how to get url addres for my asset file?

For example, in some php file i need to include "logo image" that reside on folder "[wwwroot/myapp] /images/logo.png", normally for php script image address i will write


The code above not work if i put it in "view" file, the error was "file not found". So how to write the right asset address in "view" file??

Btw, when i use


in controller to acces my asset outside the protected folder, the page show normally (the page is not render by Yii). I assume my source problem its because url that generate by Yii.


Yii::app()->request->baseUrl is the directory of your index.php main file

Hey, thanks it’s works :)

Btw, just in case if anyone have same problem

in my "view" code above


I write it like this