Increasing security on imageUpload, issues with img src="image.php"
<p>Cant seem to get the php script to execute and fetch the image script, the image placeholder.jpg is sored outside of the public_html webroot, here is what i do</p>

<p>Show image .php file</p>

<pre><code>&lt;img src="image.php?image=&lt;?php echo urlencode('placeholder.jpg') ?&gt;"/&gt;
</code></pre>

<p>image.php</p>

<pre><code>&lt;?php

    $file = basename(urldecode($_GET['image']));
    $fileDir = '/noaccess/avatars/';

    if (file_exists($fileDir . $file))
    {
        $contents = file_get_contents($fileDir . $file);

        header('Content-type: image/jpg');

        echo $contents;
    }

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