Hello, i'm sitting here and playing and trying to make a "pool" to a website in php.
What I'm going is to show the contents of a folder using php. So far I have managed to list all files in selected folder using:
It is so far a list good enough for my purposes, except for one thing. I want to hide files with specifix extensions, specifically *. php.
I'm struggling to really figure this out, because I am completely blank on the field....
What I'm going is to show the contents of a folder using php. So far I have managed to list all files in selected folder using:
PHP:
<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$thelist .= '<a href="'.$file.'">«'.$file.'» <br></a>';
}
}
closedir($handle);
}
?>
I'm struggling to really figure this out, because I am completely blank on the field....