I have a PHP class to switch pages using this method:
$urlp = '/website/';
include 'phpclass.php';
$url = new thisurl($urlp);
if(!$url->segment(1))$page = 'home'; else $page = $url->segment(1);
Switch ($page)
{
case 'home': //include 'page/homepage.php';
echo "Home";
break;
case 'about':
echo "About";
break;
default:
echo "Page not found!";
break;
}
It works with .htaccess file that i will not include for now, same as the php class. that's because i'm looking for an alternative way ton just switch pages or whatever, include files dynamically (I also have a bigger version with buffer).. so my question is what other good methods i can use to achieve same results in a better way.