Endroid\QR Code
<p>How do I save a QR Code in a specific folder after generation? </p>

<p>Below is my example code to generate the qrcode using the library found here: <a href="https://github.com/endroid/QrCode" rel="nofollow noreferrer">Endroid</a></p>

<pre><code>&lt;?php 

    require_once('src/QrCode.php');

    use Endroid\QrCode\QrCode;

    $qr = new QrCode();

    $qr -&gt;setText('Hello Kent')
        -&gt;setSize(140)
        -&gt;setPadding(10)
        -&gt;setErrorCorrection('high')
        -&gt;setForegroundColor(array('r' =&gt; 0, 'g' =&gt; 0, 'b' =&gt; 0, 'a' =&gt; 0))
        -&gt;setBackgroundColor(array('r' =&gt; 255, 'g' =&gt; 255, 'b' =&gt; 255, 'a' =&gt; 0))
        -&gt;setLabel('My label')
        -&gt;setLabelFontSize(16)
        -&gt;setImageType(IMAGE_TYPE_PNG);
        -&gt;setImagePath('../QRcode')
        -&gt;render('Hello','png');
        -&gt;save();

?&gt;
</code></pre>