How does php interface? What is the idea?

Source: Internet
Author: User
How does php interface? What is the idea? How does php interface? What is the idea? This is the kind of data returned by calling the interface. my colleague has done it in other languages, so that I can request the interface. I have never understood what this excuse is? Json data is returned. how can I use php for this excuse?


Reply to discussion (solution)

My colleague won't tell you how to request his interface address (www.xxx.com/index.php? M = api & c = controler & a = getData ),
He should also tell you whether to use get or post requests. if the data type tells you that it is json, ask him if he doesn't understand it.

In my understanding, the interface should be a class, which contains some functions, which are processed through your passing parameters and then returned to you, the returned type is JSON, which is actually the same as that of a common function. New users understand it. do not try it if any error occurs.

If it is a get request, I put the parameter on the url. what if it is a post request? How can I give my data to him,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.