摘要: 1、最新代码 "./", 'file_name_prefix' => 'cache', 'mode' => '1', //mode 1 为serialize model 2为保存为可执行文件 ); /** * 得到本类实例 * * @return Ambiguous */ public static function getInstance() { if(self::$_instance === null) { sel... 阅读全文
posted @ 2014-03-21 16:34 Otgs 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1.申请成为服务号2.申请自定义菜单,得到appid和appsecert3.用appid和appsecert获得access token4.将菜单组织成结构,通过post提交给接口5.在消息接口中处理event事件,其中的click代表菜单点击,通过响应菜单结构中的key值回应消息static function createMean($access_token){ $url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=".$access_token; $data = '{ "b 阅读全文
posted @ 2014-03-21 12:42 Otgs 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 1 $grantType, 22 'scope' => $scopeUrl, 23 'client_id' => $clientID, 24 'client_secret' => $clientSecret 25 ); 26 //Create an Http Query.// 27 $paramArr = http_build_query($paramArr); 28 ... 阅读全文
posted @ 2014-03-21 10:27 Otgs 阅读(209) 评论(0) 推荐(0) 编辑
摘要: //自定义菜单中获取access_token static function get_access_token($appid,$secret){ $url="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret=".$secret; $json=self::http_request_json($url);//这个地方不能用file_get_contents $data=json_decode($json,tr 阅读全文
posted @ 2014-03-21 10:24 Otgs 阅读(237) 评论(0) 推荐(0) 编辑