Home > Backend Development > PHP Tutorial > Some requests in the system are ajax, whether they use the api interface or are processed directly and return json.

Some requests in the system are ajax, whether they use the api interface or are processed directly and return json.

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-04 09:20:35
Original
1026 people have browsed it

Non-single page application
For example, the POST request to save an article uses JS asynchronously, which is an AJAX request
It used to be http://www.test.com/content/save, but the save address was changed to json return
You need to use this part Is the new address http://www.test.com/api/conte... For example, the API interface used?

Reply content:

Non-single page application
For example, the POST request to save an article uses JS asynchronously, which is an AJAX request
It used to be http://www.test.com/content/save, but the save address was changed to json return
You need to use this part Is the new address http://www.test.com/api/conte... For example, the API interface used?

It depends on how you write the code, the url is just a routing.
The main code level should have a unified API access layer to return unified result data.

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template