Fuelphp - 文件扩展名
我制作了一个名为 sitemaps 的控制器并具有 action_sitemap() ,但是如何告诉 Fuel 处理以下内容?:
http://site/sitemaps/sitemap.xml
以及使用相同的 action_sitemap() ?:
http://site/sitemaps/id.xml
其中 id 可以是传递的变量。
I made a controller named sitemaps and have action_sitemap() , but how do I tell fuel to handle the following?:
http://site/sitemaps/sitemap.xml
and the following using the same action_sitemap() ?:
http://site/sitemaps/id.xml
where id could be a passed variable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用路由,为您指向您选择的控制器方法的两者设置一条路由。
文档中解释了路由。
在你的routes.php应用程序配置文件中添加类似的内容:
Just use routing, setup a route for both that you point to a controller method of your choosing.
Routing is explained in the docs.
Put something like this in your routes.php app config file: