Closed grandeljay closed 3 years ago
You can't see the PHP errors because of the header()
line. Outcomment it and you'll see.
The log file was also empty, but regardless I have decided to create a file and that seems to work well.
$data = 'Not a rick-roll';
$options = new QROptions([
'outputType' => QRCode::OUTPUT_IMAGE_PNG,
'eccLevel' => QRCode::ECC_L,
'addQuietzone' => false,
]);
// invoke a fresh QRCode instance
$qrcode = new QRCode($options);
// and dump the output
$qrcode->render($data);
// ...with additional cache file
$filepathQR = 'qr-codes/' . $config['id'] . '.png';
$qrcode->render($data, $filepathQR);
Hello,
when I run an example it works but if the file is buried somewhere under
/foo/bar/image.php
the image seems to be broken. If it's in my document root it does work. Am I doing something wrong? Do I need to configure something? There don't seem to be any PHP errors.Obligatory code I am using
Output
Regards Jay