php-qrcode-detector-decoder icon indicating copy to clipboard operation
php-qrcode-detector-decoder copied to clipboard

Not working for me!

Open paktrad opened this issue 4 years ago • 1 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

paktrad avatar Mar 20 '20 13:03 paktrad

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

jackkum avatar Mar 22 '20 14:03 jackkum