Closed gagaltotal closed 3 years ago
Hi @gagaltotal as you can see in the readme for 4.x you should use $result->getMimeType(); Good luck!
I've used this method $result->getMimeType(); still the error is like that why ?
when I use this method from Readme
use Endroid\QrCode\QrCode;
use Endroid\QrCode\Writer\PngWriter;
$writer = new PngWriter();
// Create QR code
$qrCode = QrCode::create('tester');
$result = $writer->write($qrCode);
header('Content-Type: '.$result->getMimeType());
echo $result->getString();
the result is only a small box
SOLVED METHOD..
The small box indicates your image can not be rendered, probably because of an error. You can comment the header line to not output as an image, so you can see what's wrong.
okay thanks, solved
please help me
why error method Endroid\QrCode\QrCode::getMimeType() ? and me use latest version endroid/qr-code 4.0....
i use codeigniter 3.1.11 on PHP version 7.4 composer version 2.1.3
my template in view, tested qrcode
is my method wrong from the example in the readme ?