php – 文件上传请求中的Content-Transfer-Encoding
发布时间:2020-12-13 18:13:45 所属栏目:PHP教程 来源:网络整理
导读:我正在尝试使用 XMLHTTPRequest上传文件,并发送此标头: Content-Type:multipart/form-data,boundary=xxxxxxxxx--xxxxxxxxxContent-Disposition: form-data; name='uploadfile'; filename='123_logo.jpg'Content-Transfer-Encoding: base64Content-Type: ima
我正在尝试使用
XMLHTTPRequest上传文件,并发送此标头:
Content-Type:multipart/form-data,boundary=xxxxxxxxx --xxxxxxxxx Content-Disposition: form-data; name='uploadfile'; filename='123_logo.jpg' Content-Transfer-Encoding: base64 Content-Type: image/jpeg /*base64data*/ 但在服务器端PHP忽略标题“Content-Transfer-Encoding:base64” 有没有办法解决它? 附:使用base64发送数据非常重要
事实上,HTTP中没有Content-transfer-encoding
看到 http://www.ietf.org/rfc/rfc2616.txt
但您可以像http://php.net/manual/en/function.base64-decode.php一样使用base64_decode (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |