【问题标题】:php code for geeting paramenter and image from the post request从 post 请求中获取参数和图像的 php 代码
【发布时间】:2010-03-31 14:22:14
【问题描述】:

谁能指导我如何从给定的帖子请求中获取参数,特别是图像。

--0xKhTmLbOuNdArY
Content-Disposition: form-data; name="source"

lighttable
--0xKhTmLbOuNdArY
Content-Disposition: form-data; name="title"

Google (The top search engine).
--0xKhTmLbOuNdArY
Content-Disposition: form-data; name="isbn"

9780077282073
--0xKhTmLbOuNdArY
Content-Disposition: form-data; name="price"

5
--0xKhTmLbOuNdArY
Content-Disposition: form-data; name="condition"

Execlent
--0xKhTmLbOuNdArY
Content-Disposition: form-data; name="media"

Content-Type: image/jpg
Content-Transfer-Encoding: binary

ÿØÿà

注意:: ÿØÿà 是该请求中的图像。

【问题讨论】:

    标签: php iphone objective-c


    【解决方案1】:

    您应该在 PHP 文档中查找 $_POST 和 $_FILES。例如:http://www.php.net/manual/en/features.file-upload.post-method.php

    当发布这样的日志时,请尝试包含整个 HTTP 请求。它应该以“POST /url/whatever HTTP/1.1”开头并包含一些标题。您引用的部分是 multipart/mixed 块的一部分,但很难看出您的请求的其余部分是否正确。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-16
      • 2011-12-20
      • 1970-01-01
      • 2018-11-25
      • 1970-01-01
      • 2016-04-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多