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 ( PHP用PHP编写的用于生成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信息页仔细检查。