zhangchunsheng/php-qrcode 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zhangchunsheng/php-qrcode

Composer 安装命令:

composer require zhangchunsheng/php-qrcode

包简介

php qrcode is qrcode utils written in PHP.

README 文档

README

This is PHP 7+ only implementation of QR Code 2-D barcode generator.

Based on:
http://sourceforge.net/projects/phpqrcode/
By Dominik Dzienia

I was looking for a QR implementation for the pChart fork and came across this one.
It was either refactor Dominik's or use Chillerlan's (https://github.com/chillerlan/php-qrcode)
This fork is not a drop in replacement.
My code is four times smaller and two times faster
(much much faster than the Chillerlan's implementation)

Usage:

Possible hints: "Numeric", "Alphanumeric", "Byte", "Kanji"
  • Single line:

(new QRCode([

'level' => $error_correction_level,
'size' => $max_module_size,
'margin' => $white_frame_size

]))->encode('https://github.com/zhangchunsheng/php-qrcode')->toFile("example.QRcode.png");

  • Or:
    $QRCode = new QRCode(['level' => "Q", 'size' => 10, 'margin' => 4]);
    $QRCode->encode('https://github.com/zhangchunsheng/php-qrcode', $hint);

  • Dump the matrix:
    echo json_encode($QRCode->toArray());

  • Load a matrix:
    $QRCode->fromArray($matix);

  • Dump base64 encoded PNG:
    $QRCode->toBase64();

  • Create ASCII:
    $QRCode->toASCII();

  • Output to file:
    $QRCode->toFile("example.QRcode.png");
    $QRCode->toFile("example.QRcode.svg");
    $QRCode->toFile("example.QRcode.jpg");

  • Add HTTP headers:
    $QRCode->forWeb("PNG");
    $QRCode->forWeb("SVG");
    $QRCode->forWeb("JPG", $quality = 90);

统计信息

  • 总下载量: 598
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-07-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固