public function __construct() { parent::__construct(); $this->cache = \Alibaba::cache(); // 实例化云引擎缓存 $this->token = $this->cache->get('ACCESS_TOKEN'); // 获取ACCESS_TOKEN $this->msgRps = D('WeixinResponse'); // 实例化微信原始响应表 $this->weixinText = D('WeixinText'); // 实例化微信文本消息表 $this->weixinUrl = D('WeixinUrl'); // 实例化微信链接消息表 $this->weixinVideo = D('WeixinVideo'); // 实例化微信视频表 $this->weixinVoice = D('WeixinVoice'); // 实例化微信音频表 $this->weixinSVideo = D('WeixinSVideo'); // 实例化微信小视频表 $this->weixinPic = D('WeixinPic'); // 实例化微信图片消息表 $this->weixinLocation = D('WeixinLocation'); // 实例化微信地理信息表 $this->weixinUserInfo = D('WeixinUserInfo'); // 实例化用户信息表 }
public function __construct() { parent::__construct(); $this->cache = \Alibaba::cache(); // 实例化云引擎缓存 $this->token = $this->cache->get('ACCESS_TOKEN'); }
public function __construct() { parent::__construct(); $this->cache = \Alibaba::cache(); // 实例化云引擎缓存 $this->token = $this->cache->get('ACCESS_TOKEN'); $this->response = new WeixinResponseModel(); }
public function __construct() { parent::__construct(); $this->cache = \Alibaba::cache(); $this->storage = \Alibaba::storage('storage-01'); $this->token = $this->cache->get('ACCESS_TOKEN'); $this->log = new LogModel(); $this->response = new WeixinResponseModel(); $this->resource = new WeixinResourceManagerModel(); }
public function init($config) { if (!$config) { return false; } $this->config = $config; $connect = Alibaba::cache($config); $this->enable = true; $this->obj = $connect; return $this->enable; }
function shake_reset() { //实例化一个memcache对象 if (!empty($_SERVER['HTTP_APPNAME'])) { @($mem = memcache_init()); } else { if (class_exists("Memcache")) { if (class_exists("Alibaba")) { @($mem = Alibaba::cache()); $sql = 'SELECT * FROM `weixin_shake_toshake`'; $query1 = mysql_query($sql); while ($z = mysql_fetch_assoc($query1)) { $mem->delete(realpath("..") . $z['wecha_id']); } $start = realpath("..") . "UPDATE `weixin_wall_config` SET `isopen` = "; $key2 = substr(md5($start), 10, 8); $mem->delete($key2); } else { @($mem = new Memcache()); @$mem->connect('localhost', '11211'); $mem->flush(); } } } mysql_query("TRUNCATE TABLE weixin_shake_toshake"); $sql_gm = "UPDATE `weixin_wall_config` SET `isopen` = '1'"; mysql_query($sql_gm); }