How can I get ‘images’ folder path under both XAMPP (Windows) and on the deploy server (Linux)?
is possible solution, but it includes the ‘protected’ folder part. I can strip that, but I want a generic solution, which to work even if ‘images’ path has other location.
Otherway you can use the alias webroot (webroot.images)
Take a look at this
worked better for me
The default way is that for me for a long time
Yii::app()->baseUrl gives me localhost/myproject on localhost or www.mydomain.com online so Yii::app()->baseUrl.’/images’ gives the folder url for images both of two cases.