Home > Web Front-end > JS Tutorial > Solution to using ajax to transmit very large data in JQuery_jquery

Solution to using ajax to transmit very large data in JQuery_jquery

WBOY
Release: 2016-05-16 16:41:57
Original
1115 people have browsed it

Let’s talk about the problem directly. I used Jquery (1.6) Ajax request on a page and used post. The array passed and displayed has more than 500 items. The PHP side can only receive about 50 items. At first I thought it was a problem with the web server settings, so I changed things like max_upload_size. But it had no effect. Later I tried to use max_input_vars, which is a new trick, and it worked a little at first. Later, when the customer's data exceeded 2000, it was still the same. The PHP side still could not fully receive the data sent by Ajax. Finally, I found the solution on a foreign website.

Before sending the post, use JSON.stringify to process the variables to be sent, and it will be ok. What is JSON.stringify? ? ? Please move here: http://www.jb51.net/article/29893.htm

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template