微信接口多个token问题?

浏览:2167 发布日期:2013/10/16 分类:求助交流 关键字: 微信接口,thinkphp
用了麦当苗儿微信类的时候能否绑定多个token呢现在只能实现一个token
<?php
class WeixinAction extends Action{
public function index(){

$token=I('token','','trim');
//写入到用户表中对应
//$this->write_member($token);
/* 加载微信SDK */
import('Com.ThinkWechat');
//$token=I('token','','trim');

if($token=="")
{
$weixin = new ThinkWechat('weixin');
}
else
{
$weixin=new ThinkWechat($token);

}
/* 获取请求信息 */
$data = $weixin->request();
error_log(print_r(TOKEN)."\r\n", 4, "/home/www/weixinau/log2.txt");
/* 获取回复信息 */
// 这里的回复信息是通过判断请求内容自行定制的,不在 SDK范围内,请自行完成

list($content, $type) = $this->reply($data);

/* 响应当前请求 */

$weixin->response($content, $type);

}
最佳答案
评论( 相关
后面还有条评论,点击查看>>