PHP code example of oss_dog / phpqrcode

1. Go to this page and download the library: Download oss_dog/phpqrcode library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oss_dog / phpqrcode example snippets


//二维码的内容
 $text = "Test";
//二维码导出的储存地址
 $outfile = "uploads/222.png";
//二维码的大小
 $size = 6;
 //调用方法成功后,会在相应文件夹下生成二维码文件
 QRcode::png($text, $outfile, $size);