PHPackages                             ank/qrcode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ank/qrcode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ank/qrcode
==========

php qrcode

1.0.2(5y ago)063MITPHP

Since Oct 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/zhaokeli/ank-qrcode)[ Packagist](https://packagist.org/packages/ank/qrcode)[ RSS](/packages/ank-qrcode/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

ank-qrcode
==========

[](#ank-qrcode)

生成二维码
-----

[](#生成二维码)

下面给二维码添加logo的功能

```
/**
 * 生成二维码图片
 * @param  integer $size    二维码大小
 * @param  string  $content 二维码内容
 * @param  string  $logo    二维码logo图片，有则加
 * @param  string  $savePath 二维码保存路径路径有效则自动保存,设置 '' 话直接输出,设置为null，则返回图像资源
 * @return [type]           [description]
 */
\ank\QRcode::build($content = '', $size = 100, $logo = '', $savePath = '')

$config = [
    // 二维码内容
    'content'              => 'test',
    // 生成图片大小
    'size'                 => 300,
    // 二维码边距
    'margin'               => 2,
    // 像素点大小
    'matrixPointSize'      => 10,
    // 容错等级 容错级别L(7%)M(15%)Q(25%)H(30%)
    'errorCorrectionLevel' => 'H',
    // 背景色
    'back_color'           => 0xFFFFFF,
    // 前景色
    'fore_color'           => 0x000000,
    // 二维码logo图片，有则加
    'logoPath'             => '',
    // 二维码保存路径路径有效则自动保存,设置 '' 话直接输出,设置为null，则返回图像资源
    'savePath'             => '',
];
\ank\QRcode::greate($config);

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~126 days

Total

3

Last Release

2133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e531cf3f13357c2fc120a3c9335f05a92a88ac517a584dd7f0595865c4c129c7?d=identicon)[735579768](/maintainers/735579768)

---

Top Contributors

[![735579768](https://avatars.githubusercontent.com/u/2497797?v=4)](https://github.com/735579768 "735579768 (7 commits)")

### Embed Badge

![Health badge](/badges/ank-qrcode/health.svg)

```
[![Health](https://phpackages.com/badges/ank-qrcode/health.svg)](https://phpackages.com/packages/ank-qrcode)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
