• <bdo id='gqtoj'></bdo><ul id='gqtoj'></ul>

      <i id='gqtoj'><tr id='gqtoj'><dt id='gqtoj'><q id='gqtoj'><span id='gqtoj'><b id='gqtoj'><form id='gqtoj'><ins id='gqtoj'></ins><ul id='gqtoj'></ul><sub id='gqtoj'></sub></form><legend id='gqtoj'></legend><bdo id='gqtoj'><pre id='gqtoj'><center id='gqtoj'></center></pre></bdo></b><th id='gqtoj'></th></span></q></dt></tr></i><div id='gqtoj'><tfoot id='gqtoj'></tfoot><dl id='gqtoj'><fieldset id='gqtoj'></fieldset></dl></div>
    1. <tfoot id='gqtoj'></tfoot>

      <small id='gqtoj'></small><noframes id='gqtoj'>

      <legend id='gqtoj'><style id='gqtoj'><dir id='gqtoj'><q id='gqtoj'></q></dir></style></legend>

        REST 风格的 URLS 和 PHP

        REST-style URLS and PHP(REST 风格的 URLS 和 PHP)

      1. <i id='8bYT5'><tr id='8bYT5'><dt id='8bYT5'><q id='8bYT5'><span id='8bYT5'><b id='8bYT5'><form id='8bYT5'><ins id='8bYT5'></ins><ul id='8bYT5'></ul><sub id='8bYT5'></sub></form><legend id='8bYT5'></legend><bdo id='8bYT5'><pre id='8bYT5'><center id='8bYT5'></center></pre></bdo></b><th id='8bYT5'></th></span></q></dt></tr></i><div id='8bYT5'><tfoot id='8bYT5'></tfoot><dl id='8bYT5'><fieldset id='8bYT5'></fieldset></dl></div>

          <bdo id='8bYT5'></bdo><ul id='8bYT5'></ul>

                    <tbody id='8bYT5'></tbody>

                  <tfoot id='8bYT5'></tfoot>

                  <small id='8bYT5'></small><noframes id='8bYT5'>

                  <legend id='8bYT5'><style id='8bYT5'><dir id='8bYT5'><q id='8bYT5'></q></dir></style></legend>
                  本文介绍了REST 风格的 URLS 和 PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我很难理解如何使用 REST 风格的 URL.我能得到一些帮助吗?现在我有一个像这样的查询字符串:

                  I'm having a really hard time getting my head around using REST-style URLS. Can I get a little help with this? Right now I have a query string like so:

                  example.com/calendar_expanded?date=1270094400

                  我有一个隐藏 .php 扩展名的 mod 重写.我如何

                  I have a mod rewrite that's hiding the .php extension. How do I

                  1. 让这个calendar_expanded/date/1270094400成为现实.
                  2. $_GET url 之后的值?
                  1. Make this calendar_expanded/date/1270094400 happen.
                  2. $_GET the values from the url after the fact?

                  我喜欢它背后的概念,但每天工作 16 小时以满足整个月的最后期限对我的大脑造成了伤害.

                  I love the concept behind it but working 16-hour days to meet a deadline for an entire month is taking a toll on my brain.

                  感谢您的帮助.

                  推荐答案

                  如果您想创建相当多的 REST URL,您应该考虑使用一个 PHP 框架,该框架利用了 前端控制器 设计模式.

                  If you want to create quite a lot REST URLs you should consider to use a PHP framework that makes use of the Front Controller design pattern.

                  这样,每个请求都由框架处理,您可以灵活地设计 URL,但它们应该是什么样子.

                  This way, every request is processed by the framework and you are flexible to design your URLs however they should look like.

                  例如Symfony 支持开箱即用的 RESTful 设计.

                  E.g. Symfony supports a RESTful design out of the box.

                  顺便说一句,RESTful URL 只有在参数以某种方式固定并指定资源(例如博客文章的标题)时才有意义.如果您只想将参数传递给例如控制表的排序(即某物的视图),那么这应该作为普通"GET 参数进入查询字符串.

                  BTW RESTful URLs only make sense if the parameters are somehow fixed and specify a resource, for example the title of a blog post. If you want to pass a parameter only to e.g. control the sorting of a table (i.e. the view of something) then this should go as a "normal" GET parameter into the query string.

                  就您而言,您似乎想控制日历中应显示的日期.我个人只会在这里使用普通的 GET 查询字符串.

                  In your case it looks like you want to control what day should be shown in a calendar. I personally would just use the normal GET query string here.

                  这篇关于REST 风格的 URLS 和 PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    1. <i id='ZuELz'><tr id='ZuELz'><dt id='ZuELz'><q id='ZuELz'><span id='ZuELz'><b id='ZuELz'><form id='ZuELz'><ins id='ZuELz'></ins><ul id='ZuELz'></ul><sub id='ZuELz'></sub></form><legend id='ZuELz'></legend><bdo id='ZuELz'><pre id='ZuELz'><center id='ZuELz'></center></pre></bdo></b><th id='ZuELz'></th></span></q></dt></tr></i><div id='ZuELz'><tfoot id='ZuELz'></tfoot><dl id='ZuELz'><fieldset id='ZuELz'></fieldset></dl></div>
                    2. <tfoot id='ZuELz'></tfoot>

                      <small id='ZuELz'></small><noframes id='ZuELz'>

                        <bdo id='ZuELz'></bdo><ul id='ZuELz'></ul>
                        • <legend id='ZuELz'><style id='ZuELz'><dir id='ZuELz'><q id='ZuELz'></q></dir></style></legend>
                              <tbody id='ZuELz'></tbody>