curl_close($ch); return $data; } } ?> <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script> <?php $file = "C:/wamp4/www/token.txt"; $appid = "wx2c9e2b3c3e0cc058"; $appsecrect = "cf67d528c6aab80cebbfcd0ac20c8aee"; $noncestr = "dajiagame"; $wx = new WeiXin($appid, $appsecrect, $file, $noncestr); $wx->initOpenInfo(); $wx->initApiInfo(); ?> var sharesuccessfunc; var sharefuncobj; var obj = {}; //邀请人 obj.inviter = "<?php echo $wx->share; ?> "; //openId obj.id = "<?php echo $wx->openid; ?>