PHP generates QRCode instances, Phpqrcode instances
An example of PHP generation QRCode instance is described in this article. is a very useful feature. Share to everyone for your reference. Specific as follows:
The example shows the effect as shown:
The main function code is as follows:
<?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 = ' demo qrcode ';//Data $ECC = ' H ';//L-smallest, M, Q, h-best $size = ten;//1-50 $filename = $PNG _temp_dir. ' Qrcode_ '. Time (). PNG '; QRCode::p ng ($data, $filename, $ECC, $size, 2); chmod ($filename, 0777); Echo ';?>
PHP QRCode lib Click here to download this site.
I hope this article is helpful to everyone's PHP programming.
Using the Phpqrcode generated QR code, how to let the output result line
Split with \ r as in PHP
Several ways to generate two-dimensional code in PHP
.altmi.com ';//generated file name $filename= $errorCorrectionLevel. ' | '. $matrixPointSize. " PNG ';//Error correction level: L, M, Q, h$errorcorrectionlevel= ' l ';//point size: 1 to 10$matrixpointsize=4; QRCode::p ng ($data, $filename, $errorCorrectionLevel, $matrixPointSize, 2); Official given use case: one of the two documents!--? php#include: & #47; * Qrlib.phpforfullversion (Alsoyouhavetoprovidealllibraryfilesformpackagepluscachedir) Orphpqrcode.phpformergedversion (Onlyonefile, butslowerandlessaccuratecodebecausedisabledcacheandquickermaskingconfigured) *& #47; #两句话解释: # Contains qrlib.php words need to be put together with other files: files, folders. #phpqrcode. PHP is a merged version that only needs to contain this file, but the resulting picture is slow and inaccurate # Here are two ways to use: #创建一个二维码文件QRcode::p ng (& #39; codedatatext& #39; Generate image to browser QRCode::p ng (& #39; someothertext1234& #39;), & #47, & #47; createscodeimageandoutputsitdirectlyintobrowser
http://www.bkjia.com/PHPjc/882908.html www.bkjia.com true http://www.bkjia.com/PHPjc/882908.html techarticle PHP generates QRCode instances, Phpqrcode instances This article describes the PHP generation QRCode instance. is a very useful feature. Share to everyone for your reference. Here's how it works: examples demonstrate effectiveness ...