mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-15 16:26:23 +00:00
updated examples
This commit is contained in:
+2
-11
@@ -4,16 +4,7 @@ require_once '../vendor/autoload.php';
|
||||
|
||||
use chillerlan\QRCode\Output\QRImage;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QRConst;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
|
||||
$qrOptions = new QROptions;
|
||||
$qrOptions->output = new QRImage();
|
||||
$im = (new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', new QRImage))->output();
|
||||
|
||||
$qr = new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', $qrOptions);
|
||||
|
||||
header('Content-type: image/png');
|
||||
|
||||
$im = $qr->output();
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
echo '<img src="'.$im.'" />';
|
||||
|
||||
Reference in New Issue
Block a user