php-qrcode-detector-decoder
php-qrcode-detector-decoder copied to clipboard
Not working for me!
I downloaded the zip file and trying without composer: I am using as follows:
'; $qrcode = new QrReader('tests/qrcodes/'. $file); $text = $qrcode->text(); echo $text . ''; } } ?>
The output looks something like: hello_world.png
Fatal error: Uncaught Error: Class 'QrReader' not found in C:\xampp\htdocs\QRDecoder\index.php:21 Stack trace: #0 {main} thrown in C:\xampp\htdocs\QRDecoder\index.php on line 21
Meaning it can read the files but Class QrReader not working as one of more of the dependency is missing in my file.
Could someone please help. Thanks in anticipation
Class QrReader
placeed in the namespace Zxing
So if you not use a composer, you should do like that:
$qrcode = new \Zxing\QrReader('tests/qrcodes/'. $file);
// or
use \Zxing\QrReader;
$qrcode = new QrReader('tests/qrcodes/'. $file);