-- captcha.lua local captcha = {} captcha.__index = captcha --[[ 创建一个新的 fw_captcha 对象 @return 返回一个新的 fw_captcha 对象 ]] function captcha.new(db) local instance = setmetatable({}, captcha) if db == nil then instance.module = fw_captcha.new() else instance.module = db end return instance end --[[ 生成验证码 @param width 宽度 @param height 高度 @param length 长度 @param filepath 输出文件 @return 验证码 ]] function captcha:make(width, height, length, filepath) return self.module:make(width, height, length, filepath) end return captcha