createQrcode( )创建二维码(phpqrcode扩展) * * * * * ~~~ /** * * @param string $data * @param bool $file * @param string $level * @param int $size */ function createQrcode($data = '', $file = false, $level = 'L', $size = 4) { \think\Loader::import('phpqrcode.phpqrcode', EXTEND_PATH, '.php'); header("Content-type: image/png"); Qrcode::png($data, $file, $level, $size); } ~~~