php使用phpqrcode生成二维码

require_once('phpqrcode/index.php');
$PhpQRCode = new PhpQRCode();
$PhpQRCode->set('errorCorrectionLevel','H');    // 设置纠错级别(L/M/Q/H)
$PhpQRCode->set('matrixPointSize',4);           // 设置图片大小(1-10)
$PhpQRCode->set('date','http://www.baidu.com'); // 设置生成链接
$PhpQRCode->set('pngTempDir','upload/');        // 设置上传目录
$PhpQRCode->set('pngTempName', time().'.png');  // 设置图片名称
$PhpQRCode->init();

下载:https://github.com/chenjiacheng/phpqrcode-demo

原文地址:https://www.cnblogs.com/chenjiacheng/p/6522275.html