获取年/月/日作为 codeigniter 日历类中的链接
我正在尝试将一天转换为链接(如果有任何内容),因此格式将是。
site/calendar/2012/1/2
这样我就能够检索相关的信息。
在我的模型中有模板和其他选项,
和
有人可以告诉我如何获取年/月/日的日期,以便我可以检索值。
<div class="content"><a href="year/month/{day}">View</a></div>
Im trying to convert the a day to a link if there are any content so the format will be.
site/calendar/2012/1/2
so i will be able to retrieve the information that is relevant.
in my model in have the template and the other options,
and
can someone please tell me how can i get the dates as year/month/day to the so i can retrieve the values.
<div class="content"><a href="year/month/{day}">View</a></div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在
view
方法中设置月份和年份,因此您可以通过$data
数组将它们传递给视图:然后,在模型中您可以设置像这样:
You're setting the month and year in your
view
method, so you could just pass those to the view through the$data
array:then, in your model you can set it like this: