資源簡介
整合最新thinkphp3.2 微信基礎類,所有微信接口均有
代碼片段和文件信息
/**
?* 微信公眾平臺PHP-SDK?官方API部分
?*??@author??dodge?
?*??@link?https://github.com/dodgepudding/wechat-php-sdk
?*??@version?1.2
?*??usage:
?*???$options?=?array(
?* ‘token‘=>‘tokenaccesskey‘?//填寫你設定的key
?* ‘encodingaeskey‘=>‘encodingaeskey‘?//填寫加密用的EncodingAESKey
?* ‘appid‘=>‘wxdk1234567890‘?//填寫高級調用功能的app?id
?* ‘appsecret‘=>‘xxxxxxxxxxxxxxxxxxx‘?//填寫高級調用功能的密鑰
?* );
?* ?$weObj?=?new?Wechat($options);
?*???$weObj->valid();
?*???$type?=?$weObj->getRev()->getRevType();
?*???switch($type)?{
?*??? case?Wechat::MSGTYPE_TEXT:
?*??? $weObj->text(“hello?I‘m?wechat“)->reply();
?*??? exit;
?*??? break;
?*??? case?Wechat::MSGTYPE_EVENT:
?*??? ....
?*??? break;
?*??? case?Wechat::MSGTYPE_IMAGE:
?*??? ...
?*??? break;
?*?
- 上一篇:開心農場
- 下一篇:thinkphp教學
評論
共有 條評論