1、wx.request中method: POST , php后端收不到数据,GET才行
2、向数据库插入GET到的变量时
$text1 = $_GET["x"];
$text2 = $_GET["y"];
$conn = new PDO("mysql:host=$servername;dbname=ajax_demo",
$username, $password);
$sql = "INSERT INTO test (text1, text2)
VALUES ('{
$text1}', '{
$text2}')";
// 使用 exec