Home  >  Article  >  Backend Development  >  Example sharing of using qr to generate QR code in PHP_PHP Tutorial

Example sharing of using qr to generate QR code in PHP_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:40:31912browse

复制代码 代码如下:

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.jb51.net'; // 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 ''; 
?>

www.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 "...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn