$dh = opendir('page');
while (($file = readdir($dh)) !== false)
{
if($file != "." && $file != "..")
{
if (substr($file, -4, -3) ==".")
{
}
else
{
switch($_GET['p'])
{
case $file:
require('page/'.$file.'/'.$file.'.php');
break;
}
}
}
}
closedir($dh);
W jaki sposób zrobić zeby działała strona.
default:
require('page/news/news.php');
break;