For example, the following Content-type: multipartform-data, boundaryaaaaa -- aaaaacontent-disposition: form-data; name & quot; aaaa -- aaaaaaacontent-disposition: form-data=name"=image"==filename"=image.png & quot; Content-Type: imagepng phphphtml
The format of question submission is as follows:
Content-type: multipart/form-data, boundary = aaaaa
-- Aaaaa
Content-disposition: form-data; name = "name"
Aaaa
-- Aaaaa
Content-disposition: form-data; name = "image"; filename = "image.png"
Content-Type: image/png
// Here is about image decoding.
-- Aaaaa --
PHP parsing
$ Newfilename = "photo/". $ _ POST ['name']. "/". $ _ FILES ["image"] ["name"];
Echo $ newfilename;
If (move_uploaded_file ($ _ FILES ["image"] ["tmp_name"], $ newfilename ))
{
Echo "Upload successful!
";
}
Printed result: photo //
Neither name nor image information is obtained for help ....
What should I do if I write something wrong?