khanamiryan / php-qrcode-detector-decoder

This is a PHP library to detect and decode QR-codes. This is first and only QR code reader that works without extensions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working for me!

paktrad opened this issue · comments

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

commented

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);