Detecting request type in PHP (GET, POST, PUT or DELETE)

前端 未结 13 1436
不思量自难忘°
不思量自难忘° 2020-11-22 08:02

How can I detect which request type was used (GET, POST, PUT or DELETE) in PHP?

13条回答
  •  情歌与酒
    2020-11-22 08:25

    You can get any query string data i.e www.example.com?id=2&name=r

    You must get data using $_GET['id'] or $_REQUEST['id'].

    Post data means like form

    you must use $_POST or $_REQUEST.

提交回复
热议问题