PHPackages                             nanziok/think-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. nanziok/think-qrcode

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

nanziok/think-qrcode
====================

think-qrcode

v2.0(3y ago)011MITPHPPHP &gt;=7.1.0

Since Oct 25Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

think-qrcode
============

[](#think-qrcode)

The ThinkPHP5.1 qrcode 二维码生成 SDK

安装
--

[](#安装)

### 一、执行命令安装

[](#一执行命令安装)

```
composer require nanziok/think-qrcode

```

或者

### 二、require安装

[](#二require安装)

##### thinkphp5.1 安装

[](#thinkphp51-安装)

```
"require": {
        "nanziok/think-qrcode":"2.*"
},

```

或者

### 三、autoload psr-4标准安装

[](#三autoload-psr-4标准安装)

```
   a) 进入vendor/nanziok目录 (没有dh2y目录 mkdir dh2y)
   b) git clone
   c) 修改 git clone下来的项目名称为think-qrcode
   d) 添加下面配置
   "autoload": {
        "psr-4": {
            "nanziok\\qrcode\\": "vendor/nanziok/think-qrcode/src"
        }
    },
    e) php composer.phar update

```

使用
--

[](#使用)

#### 添加配置文件

[](#添加配置文件)

```
return [
    'cache_dir' => 'uploads'.DS.'qrcode',           //缓存地址
    'background'=> 'static/image/icon_cover.png'    //背景图
];

```

#### 使用方法

[](#使用方法)

```
$code = new QRcode();
$code_path =  $code->png($register_url)         //生成二维码
    ->logo('static/image/avatar-m.jpg')         //生成logo二维码
    ->background(180,500)                       //给二维码加上背景
    ->text($role,20,['center',740],'#ff4351')   //添加文字水印
    ->text($nick_name,20,['center',780],'#000000')
    ->getPath();                                //获取二维码生成的地址

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

1295d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37a3851b9e0f3095f9b955cf67d6a2c82af5727159183d214d79259e35aa8586?d=identicon)[nanziok](/maintainers/nanziok)

---

Top Contributors

[![cinaofdai](https://avatars.githubusercontent.com/u/20353921?v=4)](https://github.com/cinaofdai "cinaofdai (4 commits)")[![nanziok](https://avatars.githubusercontent.com/u/68459056?v=4)](https://github.com/nanziok "nanziok (1 commits)")[![yitotu](https://avatars.githubusercontent.com/u/48423101?v=4)](https://github.com/yitotu "yitotu (1 commits)")

### Embed Badge

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

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

###  Alternatives

[swissup/module-slick-carousel

the last carousel you'll ever need for magento2

1020.8k1](/packages/swissup-module-slick-carousel)

PHPackages © 2026

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