QR Code By endroid This library helps you generate QR codes in a jiffy. Makes use of bacon/bacon-qr-code to generate the matrix and khanamiryan/qrcode-detector-decoder for validating generated QR codes. Further extended with Twig extensions, generation routes, a factory and a Symfony bundle for easy installation and configuration. Installation Use Composer to install the library. $ composer require endroid/qr-code Basic usage use Endroid\QrCode\QrCode; $qrCode = new QrCode('Life is too short to be generating QR codes'); header('Content-Type: '.$qrCode->getContentType()); echo $qrCode->writeString(); Advanced usage use Endroid\QrCode\ErrorCorrectionLevel; use Endroid\QrCode\LabelAlignment; use Endroid\QrCode\QrCode; use Endroid\QrCode\Response\QrCodeResponse; // Create a basic QR code $qrCode = new QrCode('Life is too short to be generating QR codes'); $qrCode->setSize(300); // Set advanced options $qrCode->setWriterByName('png'); $qrCode->setMargin(10); $qrCode->setEncoding('UTF-8'); $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH); $qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); $qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); $qrCode->setLabel('Scan……
1、进入root模式 su root 2、备份sources.list cp /etc/apt/sources.list /etc/apt/sources.list_backup 3、更改源为国内阿里云源 vi /etc/apt/sources.list # Aliyun deb-src http://archive.ubuntu.com/ubuntu bionic main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ bionic universe deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu bionic partner deb-src http://archive.canonical.com/ubuntu bionic partner deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted multiverse universe #Added by……