PHP generates qrcode QR code

Source: Internet
Author: User

<?php//introduced Phpqrcode class library//phpqrcode:https://github.com/t0k4rt/phpqrcoderequire_once "phpqrcode/qrlib.php";// The first (lack of saving in the Web page to generate a QR code)//Call the PNG static method under the QRCode class QRCode::p ng ("This is a QRCode"), $content = "This is a qrcode";//content $filename = time ( ) . ". png";//File name $level = qr_eclevel_l;//fault tolerance level $size = 10;//size $padding = 3;//margin//second (custom generated QR code in Web page) QRCode::p ng ($content, False, $level, $size, $padding, true);//The third (custom-generated QR code is saved as a picture file) QRCode::p ng ($content, $filename, $level, $size, $ padding, true);/* Fault tolerance level qr_eclevel_l is a constant 0 approximately error-correcting 7% data code word qr_eclevel_m is a constant 1 about the error correction 15% of the data code word QR_ECLEVEL_Q is a constant 2 about the error correction 25% data code word qr_ Eclevel_h is a constant 3 about 30% of the data code Word error */?>


This article is from the "tong707 blog" blog, make sure to keep this source http://tong707.blog.51cto.com/12527988/1955424

PHP generates qrcode QR code

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.