PHPackages                             prosion/phpqrcode - 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. prosion/phpqrcode

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

prosion/phpqrcode
=================

PHP qrcode 二维码工具类 改进版本，支持自定义LOGO，自定义输出目录和自定义返回类型，静态方法调用，方便快捷，高效，简洁的PHP二维码生成工具

04PHP

Since May 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/porsion/phpqrcode)[ Packagist](https://packagist.org/packages/prosion/phpqrcode)[ RSS](/packages/prosion-phpqrcode/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php qrcode 二维码生成工具 base64图片二维码
==============================

[](#php-qrcode-二维码生成工具--base64图片二维码)

php生成带LOGO的二维码图片, 支持自定义LOGO，自定义输出目录和自定义返回类型，静态方法调用，方便快捷，高效，简洁的PHP二维码生成工具

支持二维码直接返回符合 RFC 2045规范 的 base64, b64 二维码, 首创方法！

使用方法
----

[](#使用方法)

```
# 切换至项目根目录后执行以下命令安装本工具
composer require "porsion/phpqrcode"
```

生成二维码 封装工具类使用方法
---------------

[](#生成二维码-封装工具类使用方法)

- 推荐方式， 只支持png

```
# autoload.php自动载入
require_once __DIR__ . 'vendor/autoload.php';

$str = "https://www.github.com/prosion";
// 直接生成并输出二维码图片，默认大小
// \tekintian\TekinQR::getQRImg($str);

// 返回base64图片流
$qr = \porsion\Porsion::getQRImg($str, 10, null, 1);
echo $qr;

// 生成带loog的二维码
// $qr = \porsion\Porsion::getQRImg($str, 10, "http://xxx/logo.png", 0);

// 生成二维码并写入到  /var/www/static/qr/123.png
// $qr =\Porsion\Porsion::getQRImg($str, 10, "http://xxx/logo.png", 2, "/var/www/static/qr/123.png");

// getQRImg(String $str, int $size = 10, String $logo = null, int $ret_type = 0, String $out_file = null)
```

phpqrcode原生工具类使用方法
------------------

[](#phpqrcode原生工具类使用方法)

- 官方模式, 可支持png, jpg格式图片

```
# autoload.php自动载入
require_once __DIR__ . '/vendor/autoload.php';

//生成PNG图片
\tekintian\QRcode::png($str, false, 3, 10, 1, 4, 1);
//生成JPG图片
// \tekintian\QRcode::jpg($str, false, 3, 10, 1, 4, 1);
```

更多用法，请参考官方文档

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a7e9158d3169634c734c32f00883dfb0e31925c1bb0f5f3bfdc5aaaae799673?d=identicon)[porsion](/maintainers/porsion)

---

Top Contributors

[![zoodt](https://avatars.githubusercontent.com/u/53898206?v=4)](https://github.com/zoodt "zoodt (2 commits)")

### Embed Badge

![Health badge](/badges/prosion-phpqrcode/health.svg)

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

###  Alternatives

[ashallendesign/laravel-executor

Configurable code that can be ran when installing or updating your web app.

2573.0k](/packages/ashallendesign-laravel-executor)

PHPackages © 2026

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