Zend Framework - make images, mp3s, scripts, etc., Just go to the shared folder?

I think these are all the questions that everyone should know, because I do not see this in the documentation: -D

I understand that a shared folder is a folder that the world has access to.

I know this applies to the css folder, but when going to the traditional php website there will be my / images folder, / js folder / mp3s, etc. Will all of these also be public folders that can be accessed through layout pages or view.phtml?

Thank!

+3
source share
3 answers

, . Apache - .conf. Index.php , () ( ) Apache .

[ . , Apache -.]

+1

Zend_Controller Quickstart, :

( , ) , .

javascript, mp3 .

0

.htaccess , , mod_rewrite:

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

, BaseUrl :

<a href="<?= $this->baseUrl('mp3/ie.mp3'); ?>">IE is mean to me, again</a>

If you need to put the files in another place, you can use setBaseUrl().

0
source

Source: https://habr.com/ru/post/1746646/


All Articles