php使用qr生成二维码的示例分享_PHP教程
时间:2021-07-01 10:21:17
帮助过:15人阅读
代码如下:
ini_set('display_errors', 'on');
$PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR;
$PNG_WEB_DIR = 'temp/';
include "qrlib.php"; // QRcode lib
$data = 'http://www.gxlcms.com'; // data
$ecc = 'H'; // L-smallest, M, Q, H-best
$size = 10; // 1-50
$filename = $PNG_TEMP_DIR.'qrcode_'.time().'.png';
QRcode::png($data, $filename, $ecc, $size, 2);
chmod($filename, 0777);
echo '
';
?>
http://www.bkjia.com/PHPjc/718614.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/718614.htmlTechArticle 代码如下:?php ini_set('display_errors', 'on'); $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; $PNG_WEB_DIR = 'temp/'; include "...