1.下载二维码扩展:https://url72.ctfile.com/f/17999272-632951188-915154?p=7793 (密码7793)
2.引入二维码类:
use phpqrcode\QRcode;
或者
其他方式引入:例如,Vender引入等
3.生成并下载:
!isset($url) && $this->error('参数非法');
$text = trim($url);
//计算图片尺寸
$width = 100;
$size = floor($width/27*100)/100 + 0.01;
$errorCorrectionLevel =intval(2) ;//容错级别
$matrixPointSize = intval($size); //生成图片大小
$ma