Leader let's write an interface
PHP provides data
I am a circle, not I do not study, I have been online search 1 days, really can not find, it may be my concept is wrong, but the exact words are said.
Want to ask the Elders to guide the maze, the best specific point, the idea to say through the line, do not need code case.
(Of course, there is no specific task, it should be a project, used to do a small small module, such as search function, get the characters in the URL to determine whether to display content, etc.)
Reply to discussion (solution)
Leader let's write an interface
PHP provides data
I am a circle, not I do not study, I have been online search 1 days, really can not find, it may be my concept is wrong, but the exact words are said.
Want to ask the Elders to guide the maze, the best specific point, the idea to say through the line, do not need code case.
(Of course, there is no specific task, it should be a project, used to do a small small module, such as search function, get the characters in the URL to determine whether to display content, etc.)
I'm not clear, I don't understand what he's talking about, interface I know, but I don't understand. PHP provides data, how to provide data with interfaces, is it get then return value?? Or what?
Provide JSON-formatted data on the line ...
You understand the right, is to get, and then return the value. The form of the value depends on the expected format of the other person.
You understand the right, is to get, and then return the value. The form of the value depends on the expected format of the other person.
For example, does he expect to be available in JSON format?
Is there any other storage in addition to JSON?
"The form of a value depends on the expected format of the other person." This sentence of yours I do not quite understand, please the old master a little nudge
It means that the other person wants to format the data, and you give it back what format data.
Interface is, get what parameter, return what result
such as test.php
Request
Type
Name
Response
Success True or False
$type = isset ($_get[' type ')? $_get[' type ': '; $name = isset ($_get[' name '])? $_get[' name ']: '; $ret = array (); if ($type ==1 && $name = = ' Fdipzone ') { $ret [' success '] = true;} else{ $ret [' success '] = false;} echo Json_encode ($ret);
Interface is, get what parameter, return what result
such as test.php
Request
Type
Name
Response
Success True or False
$type = isset ($_get[' type ')? $_get[' type ': '; $name = isset ($_get[' name '])? $_get[' name ']: '; $ret = array (); if ($type ==1 && $name = = ' Fdipzone ') { $ret [' success '] = true;} else{ $ret [' success '] = false;} echo Json_encode ($ret);
I understand that, thank you.
This provides the data interface good understanding, you can understand into a special page, the normal page is a variety of tags, interface because to facilitate the analysis and reading of the program, the returned data is some of the program understandable data such as Xml/json and some data format known parser.