public static function init($config) { self::$weixin = new WXBizMsgCrypt($config["token"], $config["encodingAesKey"], $config["corpId"]); }
<?php require_once "weixin.php"; $jssdk = new WEIXIN("wx56bf927568b41f29", "13a14ee11e306822f6ec89ee983bb58f"); $signPackage = $jssdk->GetSignPackage(); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>都市狂想</title> <meta name="apple-touch-fullscreen" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"> <meta name="description" content=""> <script type="text/javascript"> appId = '<?php echo $signPackage["appId"]; ?> '; timestamp = <?php echo $signPackage["timestamp"]; ?> ; nonceStr = '<?php echo $signPackage["nonceStr"]; ?> '; signature = '<?php echo $signPackage["signature"];