/** * 生成表情html标签 * * @param int $key 表情序号 * @return string 表情html */ public static function createEmotion($key) { is_null(self::$_emotion) && (self::$_emotion = Wekit::cache()->get('all_emotions')); isset(self::$_emotion['name'][$key]) && ($key = self::$_emotion['name'][$key]); $emotion = isset(self::$_emotion['emotion'][$key]) ? self::$_emotion['emotion'][$key] : current(self::$_emotion['emotion']); $html = "<img src=\"" . Wekit::url()->images . "/emotion/" . $emotion['emotion_folder'] . '/' . $emotion['emotion_icon'] . "\" />"; return self::_pushCode($html); }