qr码生成_在PHP中生成QR码

qr码生成

Used widely in various recent applications, QR Codes can be seen on cola cans, business cards, in sushi bars, and in museums. QR Code is a 2-dimensional barcode specification that was invented in Japan. It is patented. but it’s inventor, Denso Wave, chose not to exercise it and left the standard open for the benefit of all. The code has since grown in popularity because of its ability to include a lot of data in a single image and the proliferation of smartphones with scanning apps.

QR码广泛用于各种最新应用中,可乐罐,名片,寿司店和博物馆中都可以看到QR码。 QR Code是日本发明的二维条形码规格。 已申请专利。 但是它的发明者Denso Wave选择不使用它,并开放标准以造福所有人。 此代码由于具有在单个图像中包含大量数据的能力以及带有扫描应用程序的智能手机的泛滥而变得越来越流行。

In this article I’ll show you how you can easily generate QR Codes from within your PHP application and share some ideas on how and when to use them, We’ll be using PHP QR Code, a library written in PHP for generating QR Codes and which doesn’t require any dependencies beyond the standard GD2 graphics extension for creating images.

在本文中,我将向您展示如何轻松地从PHP应用程序中生成QR代码,并分享有关如何以及何时使用它们的一些想法,我们将使用PHP QR Code ( PHPPHP编写的用于生成QR代码的库)并且除了用于创建图像的标准GD2图形扩展之外,不需要任何依赖项。

生成您的第一个QR码 (Generating your First QR Code)

Start by downloading the latest PHP QR Code library from GitHub. I’ll assume you’ve extracted it successfully and you can go to http://localhost/phpqrcode in your development environment to find the demo version working. You can insert whatever text in the data field you want to be converted to a QR Code image as shown in the screenshot below. If you have any problem getting this to work, make sure you have PHP installed with the GD2 extension, double checking this if necessary using a PHP info page.

首先从GitHub下载最新PHP QR Code库。 我假设您已成功提取它,并且可以在开发环境中访问http:// localhost / phpqrcode以找到演示版本。 您可以在数据字段中插入要转换为QR Code图像的任何文本,如下面的屏幕快照所示。 如果您有任何问题要使它起作用,请确保已安装了带有GD2扩展名PHP,并在必要时使用PHP信息页仔细检查。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值