I’m kind of new in Yii framework. So far I can say that it’s an interesting framework to work with.
The problem that I have is the following.
I want to access some image files that their directory is located outside of my Yii’s baseUrl directory but it seems that there is a problem with the url I provide.
My directories’ structure is:
/protected – protected folder of Yii–
/public_html
and inside public_html I have the following folders:
/general
/mysite --where my baseUrl of Yii framework points to–
The images are located inside /general/images/
Someone will say why I don’t have my images folder inside my baseUrl folder but it was already created and it’s kind of 1giga heavy.
I have tried to access the files by using <?php echo Yii::app()->request->baseUrl; ?>/…/general/images/<my image file>.jpg in the source of the image element in the view but no luck…
I have also tried the solution of setManager->publish but nothing again.
Maybe my question is kind silly or simple but if someone can give me a hand I’ll appreciate it.
Also another question but more from curiosity reasons. Is there any way to put the absolute url of the images folder in Yii’s config file and call it directly through my code? something like the baseurl call more or less?
Haha of course I don’t want to use full urls but relative ones. The problem is, as I mentioned in the fisrt post, that by using relative url I don’t get anything…And I’m totally stucked…But it should be a way…I don’t think Yii limits people on where they should keep their files…