Files
xinhu/include/chajian/qrcodeChajian.php
2022-08-14 16:47:40 +08:00

17 lines
667 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* 创建二维码
*/
include_once(ROOT_PATH.'/include/phpqrcode/phpqrcode.php');
class qrcodeChajian extends Chajian
{
public function show($url='')
{
if($url=='')$url = URL;
$errorCorrectionLevel = 'L'; // 纠错级别L、M、Q、H
$matrixPointSize = 6; // 点的大小1到10
$margin = 1; //表示二维码周围边框空白区域间距值;
$bo = QRcode::png($url, false, $errorCorrectionLevel, $matrixPointSize, $margin, false);
return $bo;
}
}