I am generating QR code using endroid.
I am facing issue while generating QR code on server. Its working fine on local system.
My local php version is 7.3.7
and server php version is 7.0.20
My QR code php file like this
<?php
//$code = $_GET["code"];
header("Content-Type: image/png");
require "qr/vendor/autoload.php";
use Endroid\QrCode\QrCode;
$qrCode = new QrCode("pankaj");
header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();
?>