symfony - Is it possible to directly reference the resource file without using the assets:install command to copy the resource file to the web directory?
天蓬老师2017-05-16 16:46:01
0
1
708
$php app/console assets:install target [--symlink]
The Resource/public folder of the bundle is copied to the /web directory. Can the resource files under Resources/public be directly referenced in the template engine?
For flexibility, the physical path of the bundle can be arbitrary. Under this premise, if the resource files in the bundle can be publicly accessed, it is equivalent to opening web access permissions for multiple directories, which is not only troublesome, but also unsafe. .
In addition, Symfony 2’s AsseticBundle can do much more (assetic:dump) than just copying files, such as:
Splicing css, js and other files
Compress css, js code
Perform graphics editing (such as adding watermarks), and what is saved in the bundle is only the original image, which has many benefits
For flexibility, the physical path of the bundle can be arbitrary. Under this premise, if the resource files in the bundle can be publicly accessed, it is equivalent to opening web access permissions for multiple directories, which is not only troublesome, but also unsafe. .
In addition, Symfony 2’s AsseticBundle can do much more (assetic:dump) than just copying files, such as: