?php /** * *wechat basic callback * **/ require_once dirname(__FILE__) . '/../common/GlobalDefine.php' ; class WeChatCallback { protected $_postObject; protected $_fromUserName; protected $_toUserName; protected $_createTime; protected $_m
/**
*
*wechat basic callback
*
**/
require_once dirname(__FILE__) . '/../common/GlobalDefine.php' ;
class WeChatCallback {
protected $_postObject;
protected $_fromUserName;
protected $_toUserName;
protected $_createTime;
protected $_msgType;
protected $_msgId;
protected $_time;
pubilc function getToUserName() {
return $this->_toUserName;
}
// 组装提示信息,HINT_TPL在GlobalDefine.php中定义
protected function init($postObj) {
$resultStr = sprintf ( HINT_TPL, $this->_fromUserName,
$this->_toUserName,&this->_time, 'text', $hint ) ;
return $resultStr;
}
pubilc function init($postObj) {
// 获取参数
$this->_postObject = $postObj;
if ($this->_postObject == false) {
return false;
}
$this->_fromUserName = ( string ) trim ( $ this->_postObject->FromUserName );
$this->_createTime = ( int ) trim ( $this->_postObject->MsgId );
$this->_time = time ();
if(!($this->_fromUserName && $this->_toUserName && $this->_msgType)) {
return false;
}
return true;
}
public function process() {
// HINT_NOT_IMPLEMEMT在GlobalDefine.php中定义的一个提示信息
return $this->makeHint (HINT_NOT_IMPLEMEMT) ;
}
}
?>

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

螳螂BT
Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

安全考试浏览器
Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)