/** * 生成二维码后返回内容 * @param $value * @return array */ private function _getQrCodeContent($value) { apf_require_file('phpqrcode.php', 'classes/util/phpqrcode'); $errorCorrectionLevel = "M"; $matrixPointSize = "5"; $image = QRcode::getImage($value, false, $errorCorrectionLevel, $matrixPointSize, 2); ob_start(); ImagePNG($image); $content = ob_get_contents(); ImageDestroy($image); ob_end_clean(); return $content; }