PHP code example of 96qbhy / qrcode-scanner
1. Go to this page and download the library: Download 96qbhy/qrcode-scanner library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
96qbhy / qrcode-scanner example snippets
use Qbhy\QrCodeScanner\QrCodeScanner;
$qrCode = new QrCodeScanner('./qr.png'); //图片路径
$text = $qrCode->text(); //返回识别后的文本
echo $text . PHP_EOL;
PHP >= 5.3
GD Library