这里生成的url是什么?


What's the url being produced here

我从这行得到一个路由错误。谁能告诉我最终的url格式是什么?

$this->url(array('locate'=>'rom'), 'locate', true);

没有人可以告诉你URL,因为你没有提供足够的细节,如路由定义。

我可以告诉你的是,对URL帮助器的调用传递了以下内容:

  • 设置locate参数为"rom"
  • 使用locate路由
  • 将所有参数重置为默认值

关于最后一点;缺省值将在路由定义中设置。如果没有定义,它们将返回到框架默认值…

  • controller = "index"
  • action = "index"
  • module = "default"