Javascript-what QR code APIs are generally used to generate a QR code for platform distribution?

Source: Internet
Author: User
Generally, what QR code APIs are used to generate QR codes for platform distribution? generally, what QR code APIs are used to generate QR codes for platform distribution?

Reply content:

What QR code APIs are generally used to generate a QR code for platform distribution?

For specific use cases, php can use the qrcode third-party library.

Qrcode class library

TP

Vendor ("phpqrcode. phpqrcode"); $ QRcode = new QRcode (); $ data = $ data? $ Data: 'error occurred while generating the QR code. contact the administrator! '; // Error correction level: L, M, Q, H $ level = 'l'; // point size: 1 to 10, $ size = 8 for mobile phone 4; // The following comments the code for saving the QR code image to a local device. if you want to save the image, replace the second parameter with $ fileName: false $ path = ". /Public/Upload/QrcPic/"; if (! Is_dir ($ path) {mkdir ($ path, 0777, true);} // The generated file name $ fileName contains your prefix.inclusid.'.png '; // You can check whether the file exists, the two-dimensional code image name is returned. // $ checkFile = $ path. $ fileName; if (file_exists ($ checkFile) {return $ fileName; exit;} // stream at the output graph // QRCimg = QRcode: png ($ data, $ fileName, $ level, $ size, $ padding); $ QRcode-> png ($ data, $ path. $ fileName, $ level, $ size, $ padding );

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.