Access a file which is located before / outside the server root directory?

You cannot directly access any file outside your web directory. As your question includes the tag PHP as well, I assume you may want to use it. What you can do is the following: Inside your www directory, create a “image.php” file, with a similar content to: <?php header(‘Content-Type: image/png’); readfile(“../img/” . $_GET[‘img’]); ?> And … Read more