<?php
$urlToEncode="http://www.baidu.com";
generateQRfromGoogle($urlToEncode);
function generateQRfromGoogle($chl,$widhtHeight =‘150‘,$EC_level=‘L‘,$margin=‘0‘,$size=‘6‘)
{
$url = urlencode("http://www.baidu.com");
echo ‘<img src="http://chart.apis.google.com/chart?chs=‘.$widhtHeight.‘x‘.$widhtHeight.‘&cht=qr&chld=‘.$EC_level.‘|‘.$margin.‘&chl=‘.$chl.‘" alt="QR code" widhtHeight="‘.$size.‘" widhtHeight="‘.$size.‘"/>‘;
}
?>
php 制作二维码
2022-07-13 09:17:09