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?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
世界只因有你

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:

  1. Splicing css, js and other files
  2. Compress css, js code
  3. Perform graphics editing (such as adding watermarks), and what is saved in the bundle is only the original image, which has many benefits
  4. Wait...
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template