pc_base::load_sys_class('phpqrcode','',0); $value = 'http://www.baidu.com'; //二维码内容 $errorCorrectionLevel = 'L';//容错级别 $matrixPointSize = 6;//生成图片大小 //生成二维码图片 $fileurl =WEB_PATH.'uploadfile/mallewm/qrcode.png'; if(!file_exists($fileurl)){ QRcode::png($value, $fileurl, $errorCorrectionLevel, $matrixPointSize, 2); } $QR=WEB_PATH.'uploadfile/mallewm/helloweixin.png'; echo '<img src="'.$QR.'">';