Ecstore QR code generation

Source: Internet
Author: User

Use the phpqrcode library to generate a QR code:

1/* 2 * add 3 */4 ///////////////////////////// //// // 5/* introduce file */6 @ include (APP_DIR. '/include/lib/weixin/phpqrcode. php '); 7/* Default storage path */8 $ save_path = PUBLIC_DIR. '/weixin/'; // storage address 9 if (! File_exists ($ save_path) {10 mkdir ($ save_path); 11} 12 $ path = inclusave_path.20.deptid.'.png '; 13 $ path = strstr ($ path ,'/'); 14 $ errorCorrectionLevel = "H"; 15 $ matrixPointSize = "4"; 16 if (! File_exists ($ path) {17 $ c = 'www .baidu.com '; 18 QRcode: png ($ c, inclusave_path.20.deptid.'.png', $ errorCorrectionLevel, $ matrixPointSize ); 19} 20 $ this-> pagedata ['IMG '] = kernel: base_url (1 ). '/weixin/'.20.deptid.'.png '; 21 ///////////////////////////////////////

Use the google interface to generate a QR code:

1/* 2 * generate a QR code and call the google interface 3 * @ var array $ params 4 * @ access public 5 * @ return string 6 */7 function generateQRfromGoogle ($ data, $ widhtHeight = '000000', $ EC_level = 'h', $ margin = '0') {8 9 $ url = urlencode ($ data ); 10 11 return ''; 12 13} // End Function

Another method is to call the jquery. qrcode. js library to generate a QR code: the specific instance will not be written.

Ecstore QR code generation

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.