国产精品成人VA在线观看,亚洲日韩在线中文字幕综合,亚洲AV电影天堂男人的天堂,久久人人爽人人爽人人av东京热

News新聞

業(yè)界新聞動(dòng)態(tài)、技術(shù)前沿
Who are we?

您的位置:首頁      樂道系統(tǒng)FAQ      php生成二維碼圖片方法匯總

php生成二維碼圖片方法匯總

標(biāo)簽: 發(fā)布日期:2016-12-17 00:00:00 276

第一種方法:

1,第一種方法:利用使用最廣泛,最方便的Google api技術(shù)實(shí)現(xiàn);

2

,<?php
//封裝生成二維碼圖片的函數(shù)(方法)
/* 利用google api生成二維碼圖片

$content:二維碼內(nèi)容參數(shù)
$size:生成二維碼的尺寸,寬度和高度的值
$lev:可選參數(shù),糾錯(cuò)等級(jí)
$margin:生成的二維碼離邊框的距離*/
function create_erweima($content, $size = '100', $lev = 'L', $margin= '0') { $content = urlencode($content);
$image = '<img src="http://chart.apis.google.com/...'.$size.'x'.$size.'&cht=qr&chld='.$lev.'|'.$margin.'&chl='.$content.'" widht="'.$size.'" height="'.$size.'" />';

return $image;
}