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

后端 未结 6 401
别跟我提以往
别跟我提以往 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:21

    AllowOverride AuthConfig

    try this. Authentication may be the problem. I was working with a CGI script written in C++, and faced some authentication issues when passed DELETE. The above solution helped me. It may help in your case too.


    Also even if you don't get the solution for your problem of PUT and DELETE, do not stop working rather use "CORS". It is a google chrome app, which will help you bypass the problem, but remember it is a temporary solution, so that your work or experiments doesn't remain freeze for long. Obviously, you cannot ask your client to have "CORS" enabled to run your solution, as it may compromise systems security.

提交回复
热议问题