Posted in PHP onJanuary 20, 2014
<?php 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 = 'https://3water.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 '<img src="'.$PNG_WEB_DIR.basename($filename).'" />'; ?>
php使用qr生成二维码的示例分享
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@