How could I use the php function glob
to get files from a directory and put them in an array and then include them with index.php?file=filename
if it exists?
This is what I came up with so far but it doesn't work.
$files = glob("files/*.php");
$file = array($files);
if (in_array(..
OR is there a smarter way to do this without having to write all pages in the index.php
?