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

WBOY
Libérer: 2016-06-06 20:08:22
original
871 Les gens l'ont consulté

<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>
Copier après la connexion
Copier après la connexion

怎么这里替换了第一次验证签名能过 第二次之后就直接报错了 $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>
Copier après la connexion
Copier après la connexion

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

Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!