脚本宝典收集整理的这篇文章主要介绍了php使用qrcode生成二维码,并合成为一张图,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
include('phpqrcode.php");
$filename = "xxx.png";//图片路径
$errorCorrectionLevel = 'L';//容错级别
$matrixpointSize = 3; //生成图大小
$url = 'http://idiot6.COM';
QRcode::png($url, $filename, $errorCorrectionLevel, $matrixPointSize, 2);
$QR = "xxx.png"; // qr
$LOGo = 'layout-bg-1.png';// bg
$QR = imagecreatefromstring ( file_get_contents ( $QR ) ); //oPEn picture source
$logo = imagecreateFromstring ( file_get_contents ( $logo ) ); //open picture source
imagecopyresampled ( $logo, $QR,565,215,0,0,154,154,$QR_width, $QR_height ); // mixed picture
$result_png = rand(100000, 999999) . uniqid() . ".png"; // file name
$file = '/data/www/upload/qrcode/' . $result_png;
imagepng ( $logo, $file );//output picture
以上是脚本宝典为你收集整理的php使用qrcode生成二维码,并合成为一张图全部内容,希望文章能够帮你解决php使用qrcode生成二维码,并合成为一张图所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。