M
M
maxituning2014-11-10 09:26:11
Yii
maxituning, 2014-11-10 09:26:11

How to access images in Yii2?

I use Yii2 Advanced Template to write the application. It is necessary to store images in the common folder, as they will be used in both backend and frontend. Uploading files to the common folder is no problem. The problem arises when displaying a picture - as I understand it, pictures should be located in the subdirectory backend/web or frontend/web. (From there at least the pictures are displayed). Understanding what I lack in order to properly organize the display of pictures? what could be wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Zelenin, 2014-11-10
@maxituning

the pictures must be in the web directory of one of the applications. IMHO frontend. Or create a separate subdomain for static static.domain.ru

3
3ton, 2014-11-10
@3ton

It seems to me that you are unlikely to find a more convenient solution than this solution.
We give files efficiently using PHP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question