My current code at the moment: (it shows all the files and folders)
<?php
$files = scandir( "./" );
$URLstart = 'http';
$URLstart .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$URLstart .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$URLstart .= $_SERVER["REQUEST_URI"];
}
if ($_SERVER["HTTPS"] == "on") {$URLstart .= "s";}
for( $ctr = 0; $ctr < sizeof( $files ); $ctr++ ) {
echo "<a href='$URLstart$files[$ctr]'>$URLstart$files[$ctr]</a><br>";
}
?>

New Topic/Question
Reply




MultiQuote




|