12345678910111213141516171819202122232425262728293031323334 |
- <?php
- declare (strict_types = 1);
- namespace library\utils;
- use dh2y\qrcode\QRcode;
- use think\facade\Config;
- class QRcodeComm{
-
- private $QrTool=null;
- public function __construct($config = [])
- {
- $this->QrTool = new QRcode();
- }
-
- public function getPngErcode($data){
- $config= Config::get('qrcode');
- $code_path =$this->QrTool
- ->png($data)
- ->getPath();
- return $code_path;
- }
- }
|