search

Home  >  Q&A  >  body text

Why is my interface configuration unsuccessful?

function checkSignature($token) {
    $signature = !empty($_GET["signature"]) ? $_GET["signature"] : null;
    $timestamp = !empty($_GET["timestamp"]) ? $_GET["timestamp"] : null;
    $nonce = !empty($_GET["nonce"]) ? $_GET["nonce"] : null;
    $tmpArr = array($token, $timestamp, $nonce);
    sort($tmpArr, SORT_STRING);
    $tmpStr = implode($tmpArr);
    return sha1($tmpStr) == $signature;
}
 
// 微信公众后台填写的Token
$token = 'itsource';
// 如果验证正确,则返回参数echostr的内容,否则终止执行
if(checkSignature($token)) {
    echo $_GET['echostr'];
}
exit();


遇见是最美的时光遇见是最美的时光1997 days ago1206

reply all(4)I'll reply

  • 遇见是最美的时光

    遇见是最美的时光2019-08-21 10:39:07

    No,

    reply
    0
  • 殘留の回憶

    殘留の回憶2019-08-21 09:19:44

    No hint?

    reply
    0
  • 遇见是最美的时光

    No, I submitted it a few times at first but it didn't work, then I left it for a while and submitted it, thank you.

    遇见是最美的时光 · 2019-08-21 10:40:37
    殘留の回憶

    eh eh

    殘留の回憶 · 2019-08-21 13:13:39
  • Cancelreply