zoukankan      html  css  js  c++  java
  • PHP

    <?php
    session_start();

    $codeT = strtoupper(trim($_POST['codeT']));//接收前端传来的数据,转换成大写
        
        $raw_success = array('codeT' => 1, 'msg' => '验证码正确');
        
        $raw_fail = array('codeT' => 2, 'msg' => '验证码错误');
        
        $res_success = json_encode($raw_success);
        $res_fail = json_encode($raw_fail);
     
     
        
        header('Content-Type:application/json');//这个类型声明非常关键
     
    echo '$codeT : '.$codeT.'<br>';
    echo '$_SESSION["sessionCode"]) : '.$_SESSION["sessionCode"].'<br>';

        if ($codeT == $_SESSION["sessionCode"]) {
            echo $res_success;
        } else {
            echo $res_fail;
        }

    ?>
  • 相关阅读:
    OpenLDAP与Apache
    OpenLDAP双主
    OpenLDAP主从
    LDAP与禅道
    LDAP与jenkins
    LDAP与Samba
    LDAP与SSH
    LDAP客户端
    LDAP与migrationtools 导入系统账号
    OpenLDAP与phpldapadmin的搭建
  • 原文地址:https://www.cnblogs.com/500m/p/11220546.html
Copyright © 2011-2022 走看看