The protocol header and the protocol body are separated by "\r\n\r\n"
The content of the protocol body is obtained by the length of the Content-length
The attachment is uploaded as follows
Post/logsys/home/uploadispeedlog!dodefault.html http/1.1
Accept:text/plain, */*Accept-language:zh-cnhost:192.168.24.56content-type:multipart/form-data;boundary=-----------------------------7db372eb000e2User-agent:winhtt
Phphtml
Title submission format is as followsContent-type:multipart/form-data, BOUNDARY=AAAAA
--aaaaaContent-disposition:form-data; Name= "Name"
Aaaa--aaaaaContent-disposition:form-data; Name= "image"; Filename= "Image.png"Content-type:image/png
This is about the decoding of the picture.--aaaaa--
PHP for p
name/value pairs that you see in previous articles in this series), you must either create a proprietary data format or modify the key name to form Person1-firstname.If you use JSON, you only need to group together multiple records with curly braces:
{"People": [
{"FirstName": "Brett", "LastName": "McLaughlin", "email": "AAAA"},
{"FirstName": "Jason",
JSON (JavaScriptObjectNotation) is a lightweight data exchange format. JSON uses a language-independent text format. These features make JSON an ideal Data Exchange Language, JSON (JavaScript Object Notation), a lightweight
Submitting form data in JSON-encoded format is HTML5 's further contribution to the evolution of web development, where our HTML form data is a server-side transmitted via Key-value, a form of transmission that is very primitive i
$.fn.serializejson=function () { var serializeobj={}; var array=this.serializearray (); var str=this.serialize (); $ (array). each (function () { if (Serializeobj[this.name]) { if ($.isarray (Serializeobj[this.name])) { Serializeobj[this.name].push (This.value); } else{ serializeobj[this.name]=[serializeobj[this.name],this.value];
Submitting form data in JSON-encoded format is HTML5 's further contribution to the evolution of web development, previously our HTML form data is transmitted through the key-value of the server side, this form of transmission on
In-depth analysis of form data submitted in JSON encoding format
This article mainly introduces the in-depth analysis of the information about the form data submitted in JSON encoding format. For more information, see
Submitting
The 1.action class introduces the Struts2 "Json-default" Interceptor stack@ParentPackage ("Json-default")// Wap_package inherits the Json-default@Namespace ("/")publicclassextends wapbaseaction {...[email protected] The result type is JSON and you can set the params@Action (value = "Creatresume", results = {@Result (na
This article mainly introduces the jquery serialization form form, uses the Ajax to submit after processing returns the JSON data The example, needs the friend to be possible to refer to under 1. Returns the JSON string: nbsp; n
Submitting form data in JSON-encoded format is another major contribution to the evolution of the Web, where our HTML form data was HTML5 by Key-value, and this form of transmission is very primitive in the
This article mainly introduces the in-depth analysis of JSON coding format to submit form data, the need for friends can refer to the following
Submitting form data in JSON-encoded format is HTML5 's further contribution to the e
This article mainly introduces the jquery serialization form form, using AJAX to post a sample of the returned JSON data, and the friends you need can refer to the following1. Return the JSON string:* * Output A string to the browser */protected void Writejson (String
http://zhengxinlong.iteye.com/blog/848712The form serialization of any jquery object eliminates the hassle of large-scale spelling of form data when submitting requests, and supports key-value pairs ////*!* extended jquery form serialization function: {version:1.2, Author:Eric.Zheng, createdate:2010-12-21}** eliminated
'); }); $("#bindShipmmsiDiv table Tbody TR"). DblClick (function () {Fillshipmmsiandname ( This); $("#bindShipmmsiDiv"). Hide (); }); } } } });3. $ ("form") through jquery. Serialize () can serialize the form's data into the background, so you can manipulate the form form
As you study today, you can see that the input data in the form form is converted to a JSON jquery code, which is posted directly:$.fn.serializejson=function(){ varserializeobj={}; vararray= This. Serializearray (); $ (array). each (function(){ if(serializeobj[ This. Name]) {
returned by the backend?
You are sending an ajax request with jquery! You can use $. each (msg, function (item, index ){// Item indicates each object!// Index indicates the index});
Example of how to use json code in PHP
Use the json_decode function to decrypt data .. The JSON function used by PHP is: json_encode ($
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.