Show content of folder in PHP
To show the content of a directory in PHP and make the files like images etc downloadable without changing the Webserver config, upload this snippet as index.php to the directory. <?php$pageURL = ‘https’;$pageURL .= “://”;$pageURL .= $_SERVER[“SERVER_NAME”];$httpfolder = $pageURL.$_SERVER[“REQUEST_URI”]; // The link to this folder from outside, with slash at end$dir = getcwd();$files = array_diff(scandir($dir), […]