0
I started looking for libraries to generate qr codes and I came across this: https://github.com/endroid/qr-code, seemed to me quiet to apply and so I opted for it (and for being in php).
The problem is that when I generate the code the answer I get is this:
Anyone who is already familiar with the library or has any idea why qr code is not being shown correctly would know how to fix it?
Did I apply something wrong, need to activate a specific plug-in, something like that?
Follow the codes below. I appreciate any cooperation
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>Teste Qr</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<h1>
É pra ter um QR Code logo abaixo ;)
</h1>
<img src="getCode.php" alt="qr code">
And the file generator:
<?php
require_once( 'src/QrCode.php' );
use Endroid\QrCode\QrCode;
$qr = new QrCode();
$qr
->setText( "Hello There" );
->setSize( 200 );
->Render();
?>
I applied your code and the output was the same
– Natã Minetto
Invoke the getCode.php script and indicate which errors are being produced
– Jorge Costa
The only problem is that the qr code image follows the same, it does not appear on the page.
– Natã Minetto
The code I presented works, it may not have the bug report active in PHP and therefore sees no errors
– Jorge Costa
I’m sorry about the noobada, but how do I activate this report?
– Natã Minetto
error_reporting(E_ALL & ~E_NOTICE); http://php.net/manual/function.error-reporting.php
– Jorge Costa
I didn’t even need to activate to find an error, in the folder extracted from . ZIP there is no "vendor/autoload.php"
– Natã Minetto
As I mentioned I am using Composer a package management system and dependencies for php
– Jorge Costa
I used Poser and now it’s working, thank you very much
– Natã Minetto