mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-18 09:45:36 +00:00
🛀 data mode rework
This commit is contained in:
@@ -25,9 +25,12 @@ $options = new QROptions([
|
||||
'imageBase64' => false,
|
||||
]);
|
||||
|
||||
$qrcode = new QRCode($options);
|
||||
$qrcode->addByteSegment($data);
|
||||
|
||||
header('Content-type: image/png');
|
||||
|
||||
$qrOutputInterface = new QRImageWithText($options, (new QRCode($options))->getMatrix($data));
|
||||
$qrOutputInterface = new QRImageWithText($options, $qrcode->getMatrix());
|
||||
|
||||
// dump the output, with additional text
|
||||
echo $qrOutputInterface->dump(null, 'example text');
|
||||
|
||||
Reference in New Issue
Block a user