s_ID)) { if (mysqli_query($conn,"INSERT INTO ".$setting['SQL_DATA']['book']." (s_ID,getbook,time) VALUES ('$student','TRUE','$time')")) { // 编译数据 $data = array( 'output'=>'SUCCESS', 'code'=>200, 'info'=>'操作已完成', ); // 输出数据 echo json_encode($data,JSON_UNESCAPED_UNICODE); } } else { // 编译数据 $data = array( 'output'=>'SQL_DENY', 'code'=>403, 'info'=>'操作拒绝!已经有数据了' ); // 输出数据 echo json_encode($data,JSON_UNESCAPED_UNICODE); } mysqli_query($conn,"UNLOCK TABLE"); } else { // 编译数据 $data = array( 'output'=>'KEY_ERROR', 'code'=>403, 'info'=>'密钥错误' ); // 输出数据 echo json_encode($data,JSON_UNESCAPED_UNICODE); header("HTTP/1.1 403 Forbidden"); }