davidkongdesheng/qrcode-detector-decoder

1.0.8 2020-09-01 14:17 UTC

This package is auto-updated.

Last update: 2024-09-29 05:48:50 UTC


README

这是一个用于检测和解码二维码的PHP库。
这是第一个也是唯一一个无需扩展即可工作的二维码读取器。
移植自ZXing库

安装

推荐通过Composer安装此库。

从您的项目根目录运行以下命令

$ composer require davidkongdesheng/qrcode-detector-decoder

用法

require __DIR__ . "/vendor/autoload.php";
$qrcode = new QrReader('path/to_image');
$text = $qrcode->text(); //return decoded text from QR Code

要求

  • PHP >= 5.6
  • GD库

贡献

您可以通过添加功能、清理代码、添加Composer等方式帮助项目。

  1. 分支它
  2. 创建您的功能分支:git checkout -b my-new-feature
  3. 提交您的更改:git commit -am '添加某些功能'
  4. 推送到分支:git push origin my-new-feature
  5. 提交pull请求