Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/212.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php ContentType:向资源发布访问令牌时的多部分/表单数据_Php_Forms_Oauth - Fatal编程技术网

Php ContentType:向资源发布访问令牌时的多部分/表单数据

Php ContentType:向资源发布访问令牌时的多部分/表单数据,php,forms,oauth,Php,Forms,Oauth,我需要您的帮助,我正在实现OAuth2服务,从https://github.com/bshaffer/oauth2-server-php 一切正常,但当我在表单获取错误中使用enctype=“multipart/form data”时,提供的访问令牌无效 我的表格 <form action="contact.php" method="post" enctype="multipart/form-data" name="contact" id="conact"> <table&

我需要您的帮助,我正在实现OAuth2服务,从
https://github.com/bshaffer/oauth2-server-php

一切正常,但当我在表单获取错误中使用
enctype=“multipart/form data”
时,提供的访问令牌无效

我的表格

<form action="contact.php" method="post" enctype="multipart/form-data" name="contact" id="conact">
  <table>
    <tbody>
      <tr>
        <td>Image</td>
        <td><input type="file" name="image" id="image" value="" /></td>
      </tr>
      <tr>
        <td>Name</td>
        <td><input type="text" name="name" id="name" maxlength="25" value="" /></td>
      </tr>
      <tr>
        <td>Status</td>
        <td><input type="text" name="status" id="status" maxlength="25" value="" /></td>
      </tr>
       <tr>
        <td>Access Token</td>
        <td><input type="text" name="access_token" id="access_token" value="" /></td>
      </tr>
      <tr>
        <td colspan="2"><input type="submit" name="submit" id="submit" value="Submit" /></td>
      </tr>
    </tbody>
  </table>
</form> 
请帮忙。
谢谢

我还没有得到这些答案,所以我使用了另一种方法,我像这样传递了访问令牌

<form action="contact.php?access_token=" method="post" enctype="multipart/form-data" name="contact" id="conact">
  <table>
    <tbody>
      <tr>
        <td>Image</td>
        <td><input type="file" name="image" id="image" value="" /></td>
      </tr>
      <tr>
        <td>Name</td>
        <td><input type="text" name="name" id="name" maxlength="25" value="" /></td>
      </tr>
      <tr>
        <td>Status</td>
        <td><input type="text" name="status" id="status" maxlength="25" value="" /></td>
      </tr>
      <tr>
        <td colspan="2"><input type="submit" name="submit" id="submit" value="Submit" /></td>
      </tr>
    </tbody>
  </table>
</form> 

形象
名称
地位

它工作得很好

通过这样做,我也解决了类似的问题


形象
名称
地位

我在oauth官方图书馆也发现了关于这一点的提及,足以提供信息
<form action="contact.php?access_token=" method="post" enctype="multipart/form-data" name="contact" id="conact">
  <table>
    <tbody>
      <tr>
        <td>Image</td>
        <td><input type="file" name="image" id="image" value="" /></td>
      </tr>
      <tr>
        <td>Name</td>
        <td><input type="text" name="name" id="name" maxlength="25" value="" /></td>
      </tr>
      <tr>
        <td>Status</td>
        <td><input type="text" name="status" id="status" maxlength="25" value="" /></td>
      </tr>
      <tr>
        <td colspan="2"><input type="submit" name="submit" id="submit" value="Submit" /></td>
      </tr>
    </tbody>
  </table>
</form>