首頁  >  文章  >  後端開發  >  微信後台操作基礎類別管理

微信後台操作基礎類別管理

WBOY
WBOY原創
2016-08-08 09:26:181155瀏覽

/**
* 創作者:PhpStorm.
* 使用者:wym
* 日期:15-3-18
* 時間:下午2:15
*/

class Wx_function{
var $FromUsername = null;
var $ToUsername = null;
var $MsgType = null;
varicEvent = nfull $ EventKey = null;var$Keyword = null;
var $obj = null;

函數__construct(){
// // $ postObj = simplexml_load_string($ glopals [“ http_raw_post_data”] FromUsername = $postObj->FromUserName;

$this->ToUsername = $postbn; $this->EventKey = $postObj->EventKey; //

$this->MsgType = $postObj->MsgType;
$this->PicUrl = $postObj->PicUrl;
this-$ >Event = $postObj->Event;
$this ->關鍵字=trim($postObj->內容);



public function wxRequest($arr, $response){
public function wxRequest($arr, $response){
public function wxRequest($arr, $response){
​​//不同型別直接封裝
$response){

case 'text' :

fmssage = $this->wxGet文字($arr);
打破;
案例'新聞':
案例$mssage = $this->wxGetNews($ arr);
打破;
案例'聲音':
$ms鼠尾草= $this->getVoice($ arr);



//print_r($arr);

return $ms
//print_r($arr);

return $mssage;
//事件處理

public function wxEventRequest($Content, $response = 'text'){

$mssage = '';
switch ($this->MsgType) {
':switch ($this -> 事件) {
案例'訂閱' :
開關($response) {
案例'文字' :
案例$mssage = $this->wxGet Text($Content); ;
案例'新聞' :
$msage = $this->wxGetNews($Content);
中斷;
中斷;
案例'取消訂閱' :




🜎





🎜🎜🎜🎜🎜🎜🎜🎜🎜🎜🎜🎜 🎜 }🎜 🎜需要詳細的源碼聯絡我🎜 🎜 以上就介紹了微信後台操作基礎類管理,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。 🎜 🎜 🎜
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
上一篇:nginx開機啟動下一篇:nginx開機啟動