目录结构:
- index.html
- layui
- .......
- .......
- js
- jquery-3.3.1.min.js
- server
- server.php
- api.php
数据库:
//新建数据库wxserver
//保存代码为wxserver.sql
//运行sql文件
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for wechat
-- ----------------------------
DROP TABLE IF EXISTS `wechat`;
CREATE TABLE `wechat` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`wechat_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '账号',
`wechat_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '密码',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 4278 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
index.html
<div class="layui-fluid">
<link rel="stylesheet" href="/layui/css/layui.css">//引入layui的css文件
<script src="/layui/layui.js"></script>//引入layui的js文件
<script src="/js/jquery-3.3.1.min.js"></script>//引入jQuery文件
<blockquote class=