这是我第一次使用symfony 2.所有我想在这里做的是每当用户点击提交按钮,他将去另一个页面.
但是我的索引页没有加载.他们说我的路由文件有问题.我不知道我做错了什么这是我的路由文件.请帮帮我.
community_online_shop_homepage: pattern: / defaults: { _controller: CommunityOnlineShopBundle:Page:index } _login: pattern: /login defaults: { _controller: CommunityOnlineShopBundle:Page:login}
请帮帮我.我被困了几个小时
YAML文件使用空格作为缩进,您可以使用2或4个空格进行缩进,但不使用选项卡.换句话说,禁止标签缩进:
原文链接:https://www.f2er.com/php/130985.htmlWhy does YAML forbid tabs?
Tabs have been outlawed since they are treated differently by different editors and tools. And since indentation is so critical to proper interpretation of YAML,this issue is just too tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs in Python source is a headache for many people and that were he to design Python again,he would forbid them.
(来源:YAML FAQ(感谢Destiny Architect的链接))
例如,Symfony configuration file可以写入2或4个空格作为缩进:
4个空格
doctrine: dbal: default_connection: default
2个空格
doctrine: dbal: default_connection: default