I
I
iceman21122014-09-16 10:04:44
Yii
iceman2112, 2014-09-16 10:04:44

Where to store shared image files?

Images must be available from frontend and backend. If you store them in common, then I don’t know any other way how to set a parameter - something like - domain (equal, for example, localhost / yii)
And, accordingly, when inserting an image into a view, use it to generate src
Or is there another way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-09-16
@butteff

What is the problem with creating a folder at the root of the web server and accessing it directly, either in php or in the frontend via src?

I
iceman2112, 2014-09-16
@iceman2112

<?= Html::img(['/uploas/banners']); ?> output the same path, from backend
/yii/backend/web/uploas/banners. Now, if there would be a parameter, then it would be possible to

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question