簡體   English   中英

使用 postman 發送 POST 請求,但在 php 中接收 GET 請求。 我嘗試使用 postman 創建 API

[英]Send POST request using postman but receiving GET request in php. I try to create API using postman

echo $req=$_SERVER["REQUEST_METHOD"]; // outputs "GET"

我嘗試使用 postman 創建 API。 在 localhost 中運行它時運行完美,但是在服務器中運行此代碼時它會顯示 GET。 誰能幫我?

檢查您的服務器 http 或 https。 如果服務器是 https 並且您發送 http 發布請求,那么它會顯示此類問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM