I wrote an upload photo api for ios to use:
if($_FILES["cover"]["size"] != ""){
// do....
}else{
echo "error!";
}
The counterpart bit is also cover and post matching
, but it just happens to be error!
can"t catch the file size
of the counterparty at all. How do you explain this?
is there anything else I need to configure here or on the other side?
update
whether php can print out Content-Disposition?
POST /test.html HTTP/1.1
Host: example.org
Content-Type: multipart/form-data;boundary="boundary"
--boundary
Content-Disposition: form-data; name="field1"
value1
--boundary
Content-Disposition: form-data; name="field2"; filename="example.txt"
value2
--boundary--
can php print this message?