How to enable and use HTTP PUT and DELETE with Apache2 and PHP?

后端 未结 6 407
别跟我提以往
别跟我提以往 2020-11-29 04:55

It should be so simple. I\'ve followed every tutorial and forum I could find, yet I can\'t get it to work. I simply want to build a RESTful API in PHP on Apache2.

In

6条回答
  •  生来不讨喜
    2020-11-29 05:13

    The technical limitations with using PUT and DELETE requests does not lie with PHP or Apache2; it is instead on the burden of the browser to sent those types of requests.

    Simply putting

    will not work because there are no browsers that support that method (and they would simply default to GET, treating PUT the same as it would treat gibberish like FDSFGS). Sadly those HTTP verbs are limited to the realm of non-desktop application browsers (ie: web service consumers).

提交回复
热议问题