get a PHP delete variable

前端 未结 4 1726
一整个雨季
一整个雨季 2021-02-07 04:25

If I am issuing an HTTP DELETE, how can I access the PHP body/variable? I know if you\'re issuing POST, you access it via $_POST[\'varname\'], but how do you access

4条回答
  •  旧巷少年郎
    2021-02-07 04:33

    I don't think you can access it in a globally available array, but you can determine the request typer, see here: Detecting request type in PHP (GET, POST, PUT or DELETE)

提交回复
热议问题