PHP生成二维码
/**
* 生成原始的二维码(生成图片文件)
* @param int $level
* @param int $size
*/
public function qrcode($level=8,$size=8){
Vendor('phpqrcode.phpqrcode');
$errorCorrectionLevel =intval($level) ;//容错级别
$matrixPointSize = intval($size);//生成图片大小
//生成二维码图片
$object = new \QRcode();
//二维码内容
$url = "http://".$_SERVER['SERVER_NAME']."/index.php/Home/Explain/explain?t_id=".$_GET['t_id']."&u_id=".$_GET['u_id'];
$object->png($url, false, $errorCorrectionLevel, $matrixPointSize, 2);
}