apache - php分块上传现在还能用吗。

WBOY
Release: 2016-06-06 20:08:22
Original
904 people have browsed it

<code>   * 生成签名
   * @param $data
   * @param bool $isFormApiKey: 签名生成方式 e.g: true 使用表单API的key生成
   * @return bool|string
   */
  public function createSign($data, $isFormApiKey = true)
  {
      if(is_array($data)) {
          ksort($data);
          $string = '';
          foreach($data as $k => $v) {
              $string .= "$k$v";
          }
          $string .= $isFormApiKey ? $this->formApiKey : $this->tokenSecret;
          $sign = md5($string);
          dump($sign);
          return $sign;
      }
      return false;
  }</code>
Copy after login
Copy after login

怎么这里替换了第一次验证签名能过 第二次之后就直接报错了 $this->tokenSecret; 一直报签名错误

回复内容:

<code>   * 生成签名
   * @param $data
   * @param bool $isFormApiKey: 签名生成方式 e.g: true 使用表单API的key生成
   * @return bool|string
   */
  public function createSign($data, $isFormApiKey = true)
  {
      if(is_array($data)) {
          ksort($data);
          $string = '';
          foreach($data as $k => $v) {
              $string .= "$k$v";
          }
          $string .= $isFormApiKey ? $this->formApiKey : $this->tokenSecret;
          $sign = md5($string);
          dump($sign);
          return $sign;
      }
      return false;
  }</code>
Copy after login
Copy after login

怎么这里替换了第一次验证签名能过 第二次之后就直接报错了 $this->tokenSecret; 一直报签名错误

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template