總結:
- 當 HTTP POST 請求的 Content-Type 是 application/x-www-form-urlencoded:php://input 中是形同 a=1&b=2的原始數據。$_POST 中是關聯數組(常規的post表單提交、ajax默認post提交)
- 提交表單時。 enctype="multipart/form-data" 的時候php://input 是無效的
- $_POST 不能獲取 Content-Type = "text/plain"時 post的數據, php://input可以