PHP generates QRCode instances, Phpqrcode instances _php Tutorials

Source: Internet
Author: User

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 ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.