<?php
$try=preg_replace('/html$/','php',$_SERVER["REQUEST_URI"]);
$try=preg_replace('/htm$/','php',$try);
$tryfile=$_SERVER["DOCUMENT_ROOT"].$try;
$trydir=dirname($_SERVER["DOCUMENT_ROOT"].$try);


if(is_readable($tryfile))
{
  set_include_path($trydir . PATH_SEPARATOR . get_include_path());
  include($tryfile);
}
else
{
  echo $_SERVER["REQUEST_URI"]." not found";
}
?>
