mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-26 12:08:09 +00:00
updated examples
This commit is contained in:
+6
-7
@@ -2,8 +2,8 @@
|
||||
|
||||
require_once '../vendor/autoload.php';
|
||||
|
||||
use chillerlan\QRCode\Output\QRString;
|
||||
use chillerlan\QRCode\Output\QRStringOptions;
|
||||
use chillerlan\QRCode\Output\QRMarkup;
|
||||
use chillerlan\QRCode\Output\QRMarkupOptions;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
|
||||
@@ -42,14 +42,13 @@ echo '<style>
|
||||
|
||||
</style>';
|
||||
|
||||
$qrStringOptions = new QRStringOptions;
|
||||
$qrStringOptions->type = QRCode::OUTPUT_STRING_HTML;
|
||||
$qrStringOptions->eol = '';
|
||||
$qrStringOptions = new QRMarkupOptions;
|
||||
$qrStringOptions->type = QRCode::OUTPUT_MARKUP_HTML;
|
||||
|
||||
$qrOptions = new QROptions;
|
||||
$qrOptions->typeNumber = QRCode::TYPE_05;
|
||||
$qrOptions->errorCorrectLevel = QRCode::ERROR_CORRECT_LEVEL_M;
|
||||
$qrOptions->errorCorrectLevel = QRCode::ERROR_CORRECT_LEVEL_L;
|
||||
|
||||
$qr = new QRCode('skype://callto:echo123', new QRString($qrStringOptions), $qrOptions);
|
||||
$qr = new QRCode('skype://callto:echo123', new QRMarkup($qrStringOptions), $qrOptions);
|
||||
|
||||
echo '<div class="qrcode">'.$qr->output().'</div>';
|
||||
|
||||
Reference in New Issue
Block a user