In the past, the front-end PHP was used for simple logic and output, and the backend layer php was used for data interfaces, so there was no worry that the front-end was exposed by backend mysql. But now I want to change the front-end to JS. If I
1. Interface introduction and CreationKeyword: Interface2. Interface references and specificationsKeyword: ImplementsInterface: A special abstract class whose member attributes are all abstract. It serves as a standard in a program.1. All classes
IOS Object C Strong typeAndroid Java Strong typeWAP JavaScript Weak typeBackground php Weak typeDevelopment interface WAP and app sharingA strongly typed language may require that the returned value be an array to be guaranteed empty when it is ' []
I recently used php to write the app interface. I have some questions about the token (token) first) the token is the user token generated when the user logs on. The user token is saved to the database on the server. the client caches the token in
1, the introduction and creation of the interface
Keyword: interface
2, the interface Reference and specification
Keyword: implements
Interface: A special abstract class in which the member attributes are all abstract, and the function of the norm
Interface Dispatch2{public function Getcontroller ();} Class QueryString implements Dispatch2{public function Getcontroller ($url = ', $url 2 = ') {echo ' 234 ';}} $b = new QueryString (); Echo $b->getcontroller ();
The above procedures can be
Copy codeThe Code is as follows: Interface js {
Function ys ($ a, $ B );
}
Class Af implements js {
Function ys ($ a, $ B ){
Return "addition operation... the result is:". ($ a + $ B );
}
}
Class Jf implements js {
Function ys ($ a, $ B ){
Return
1. return code. I usually use 0 and 1, and the success is 0. all failures are 1. how do you write them. 2. for interface security, how do you sign a signature. 1. return code. I usually use 0 and 1, and the success is 0. all failures are 1. how do
welcomemsg= "HELLO, Welcome to subscribe! "; $this->main (); Open when first verified, then close ***************}//First token verify public function main () {$echoStr =$_get[' E Chostr ']; if ($this->checkres ()) {echo $
Php uses interfaces and combinations to simulate multi-inheritance. Simulate multiple inheritance by combining them. In PHP, multi-inheritance is not supported. if we use multiple class methods to implement code reuse, is there any way? That is the
After I query or update the data in the interface, I need to return the JSON format data, and now the problem is that after processing the returned data by json_encode, some int types of data are enclosed in quotation marks to remove the single
Service A to provide data 100W a day of log data, b need to write an interface to crawl service a data, (assuming a 100W can be simulated from the database to take out), now need to design an interface, to ensure that the interface can be relatively
The main purpose is to test the data returned by the interface is correct, and then there is the interface of the process testing, such as-registration-Login-Change Password-other operations.
感谢回复:>
Reply content:
The main purpose is to test
The previous architecture is the front-end PHP to do simple logic and output, the back-end layer of PHP Do data interface, so do not worry about the front end is blown back end MySQL is exposed.
But now want to change the front end to JS, if the API
PHP /* ** Abstract policy roles, implemented using interfaces * interfaces only contain signatures for methods, delegates, or events; */ Interface Flyinterface { Public Function Fly ();} /* ** Specific policy a: Flying with wings */
Interface problemsThe most important thing to call PHP interfaces is to use curl to capture information.
CopyCodeThe Code is as follows: $ CH = curl_init ();
Curl_setopt ($ ch, curlopt_url, $ URL); // URL
Curl_setopt ($ ch, curlopt_post, true);
$str = $HTTP _raw_post_data; $js = Json_decode ($str); $phone = $js->phone;
Reply to discussion (solution)
But it doesn't seem to be worth it.
Using environment variables $HTTP _raw_post_dataNeed to open the always_populate_raw_post_data
Recently in the interface with PHP to write apps, there are some questions
First on token (token)Token is generated when the user logs onUser Token save inbound client on the server the local majority of the interfaces require the client to send
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.