Symfony路由带“#”符号(哈希标志)

时间:2012-11-13 19:22:45

标签: php symfony-1.4 url-routing

我在起诉Symfony 1.4并且在添加带有“#”(哈希)符号的路线时出现问题

我希望路线是例如:

mydomain.com/#example

它应该导致:

module : example
action : index

我应该如何运作?

1 个答案:

答案 0 :(得分:0)

来自docs

<?php echo link_to('my article', 'article/read', array(
  'query_string' => 'title=Finance_in_France',
  'anchor' => 'foo'
)) ?>
=> <a href="/article/read?title=Finance_in_France#foo">my article</a>

<?php echo link_to('my article', 'article/read?title=Finance_in_France#foo') ?>
=> <a href="/routed/url/to/Finance_in_France#foo">my article</a>