使用phpqrcode生成二维码

在百度搜索phpqrcode  就会出来官网,然后点击进入下载类文件

 

 

加载phpqrcode.php  调用方法就可以了,例如:

public function EWM(){
        for($i=1;$i<=150;$i++){
            $token = base64_encode(rand(0,99999999));
            $data = 'http://www.peita.net?ak='.$token."A4";
            $res = new \QRcode();
            $filename = 'scanning_'.time().'_'.rand(0,66666).'.jpg';
            $res->png($data,'./ewmimages/'.$filename,QR_ECLEVEL_L,6,2);
        }
        echo "ok";
            
      }

  这样就生成了!!!

posted on 2017-05-19 17:21  车车大人  阅读(951)  评论(0)    收藏  举报