diff --git a/lib/Auth/AuthAPI.php b/lib/Auth/AuthAPI.php index 240a5d8..513384b 100644 --- a/lib/Auth/AuthAPI.php +++ b/lib/Auth/AuthAPI.php @@ -115,7 +115,7 @@ private static function getSessionKeyDirectly ($appId, $appSecret, $code) { ]; list($status, $body) = array_values(Request::get([ - 'url' => 'https://api.weixin.qq.com/sns/jscode2session?' . http_build_query($requestData), + 'url' => 'https://api.weixin.qq.com/sns/jscode2session?' . http_build_query($requestParams), 'timeout' => Conf::getNetworkTimeout() ])); diff --git a/lib/Mysql/Mysql.php b/lib/Mysql/Mysql.php index 66cd512..a5db494 100644 --- a/lib/Mysql/Mysql.php +++ b/lib/Mysql/Mysql.php @@ -24,7 +24,7 @@ public static function getInstance () { $_pass = $mysql['pass']; $_char = $mysql['char']; $_db = $mysql['db']; - $dsn = "mysql:host=$_host;dbname=$_db;charset=$_char"; + $dsn = "mysql:host=$_host;dbname=$_db;port=$_port;charset=$_char"; try { self::$conn = new PDO($dsn, $_user, $_pass);