I've written a small code that get $_GET["page"] and if this exists, write the page $_GET["page"] . ".html" into a div (with echo). If this not exists, the page is "about.html". The problem is that and I've searched but I don't find the solution... Fatal error: Function name must be a string in index.php on line 63. If i go into a page that don't exists (for exampleindex.php?page=test) work (print "NOT FOUND") but if I go into a page that exists (for example index.php?page=about or simply index.php) don't work. This is the code:
$page = "about";
if (isset($_GET["page"]))
if (!empty($_GET["page"]))
$page = $_GET["page"];
$page .= ".html";
$result = "NOT FOUND";
if (file_exists($page))
$result = $file_get_contents($page); //line 63
echo $result;