How to call a php function from ajax?

前端 未结 4 1920
情话喂你
情话喂你 2020-12-06 01:03

I am familiar of how to get ajax to go to a php page an execute a series of things and then return json data. However is it possible to call a specific function which reside

4条回答
  •  醉酒成梦
    2020-12-06 01:33

    If I understand correctly, yes you can. Put all your functions in one php file and have the ajax pass as a parameter which one you want to call. Then with a switch or if structure, execute the one you want.

提交回复
热议问题