我应该在Symfony项目中保存我的css和js文件? [英] Where should I save my css and js files in Symfony project?

查看:165
本文介绍了我应该在Symfony项目中保存我的css和js文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案
>

文档非常具体,关于在哪里保存您的javascript& css档案



您储存在%SF_ROOT_DIR%/ web / css %SF_ROOT_DIR %/ web / js



然后将它们包含在 view.yml use_stylesheet(''); / p>

The docs seem unclear.I am not sure if I have to rewrite rules with apache so that their folder is staic or something?

解决方案

the documentation is very specific about where to save your javascript & css files

You save them in %SF_ROOT_DIR%/web/css and %SF_ROOT_DIR%/web/js.

You then include them either in the view.yml or you include them manually on each page with use_javascript(''); and use_stylesheet('');

这篇关于我应该在Symfony项目中保存我的css和js文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆