Skip to content

Instantly share code, notes, and snippets.

@iwillhappy1314
Created November 24, 2018 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iwillhappy1314/98d3be5e9b1d52516d9516e0c5ea19d6 to your computer and use it in GitHub Desktop.
Save iwillhappy1314/98d3be5e9b1d52516d9516e0c5ea19d6 to your computer and use it in GitHub Desktop.
Endroid 生成二维码
use Endroid\QrCode\QrCode;
$qrCode = new QrCode($signature_url);
$qrCode->setMargin(0);
$html = '<img id="js-signature" src="data:image/jpeg;base64,' . base64_encode($qrCode->writeString()) . '" alt="" />';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment