Creating a web service in PHP

后端 未结 7 885
日久生厌
日久生厌 2021-01-06 12:28

I would like to create a web service in PHP which can be consumed by different consumers (Web page, Android device, iOS device).

I come from a Microsoft background s

7条回答
  •  伪装坚强ぢ
    2021-01-06 13:14

    Easiest way in PHP is to use GET/POST as data-in and echo as data-out. Here's a sample:

    Save this as test.php and go to http://localhost/test.php?method=add&a=2&b=3 (or wherever your webserver is) and it should say 5.

提交回复
热议问题