Heim  >  Artikel  >  Backend-Entwicklung  >  PHP生成二维码库phpqrcode_PHP教程

PHP生成二维码库phpqrcode_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:17:27938Durchsuche

Description

PHP QR Code is open source (LGPL) library for generating QR Code, 2-dimensional barcode. Based on libqrencode C library, provides API for creating QR Code barcode images (PNG, JPEG thanks to GD2). Implemented purely in PHP.

Features

  • Supports QR Code versions (size) 1-40
  • Numeric, Alphanumeric, 8-bit and Kanji encoding.
  • Implemented purely in PHP, no external dependencies except GD2
  • Exports to PNG, JPEG images, also exports as bit-table
  • TCPDF 2-D barcode API integration
  • Easy to configure
  • Data cache for calculation speed-up
  • Debug data dump, error logging, time benchmarking
  • Provided merge tool helps deploy library as a one file
  • new! API documentation
  • new! Over 30 detailed examples
  • 100% Open Source, LGPL Licensed

Demo

PHP生成二维码库phpqrcode_PHP教程-86,10 +86,15- =ImageCreate( * , * - ImageCopyResized(, , 0, 0, 0, 0, * , * , , + + = (('IMAGE_WIDTH') ? IMAGE_WIDTH : * + = (('IMAGE_HEIGHT') ? IMAGE_HEIGHT : * + + =ImageCreate(, + + ImageCopyResized(, , 0, 0, 0, 0, , , , - of + }

用法,设置生成的二维码宽高为 500px

<span define</span>('IMAGE_WIDTH', 500<span );
</span><span define</span>('IMAGE_HEIGHT', 500<span );
QRcode</span>::png('http://www.cnblogs.com/toby/)');

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/626603.htmlTechArticleDescription PHP QR Code is open source (LGPL) library for generating QR Code, 2-dimensional barcode. Based on libqrencode C library, provides API for creating QR Code barcode image...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn