//生成二維碼圖片,返回圖片路徑
function scerweima($url){
    $value = $url;         //二維碼內(nèi)容,此處是鏈接地址
    $errorCorrectionLevel = 'L';  //容錯級別
    $matrixPointSize = 5;      //生成圖片大小
    //生成二維碼圖片
    $filename = '/f/image/qrcode/'.getuid().'.png';  //可生成不同的文件名字,getuid()為隨機(jī)數(shù)函數(shù),保存圖片地址
    QRcode::png($value,$filename , $errorCorrectionLevel, $matrixPointSize, 2);
    $QR = $filename;        //已經(jīng)生成的原始二維碼圖片文件
    $QR = imagecreatefromstring(file_get_contents($QR));
    //輸出圖片
    imagepng($QR, 'qrcode.png');
    imagedestroy($QR);
}
                    
