file_get_contents don't work


file_get_contents don't work

我编写了一小段代码,获取$_GET["page"],如果存在,则写入$_GET["page"]页面。".html"插入div(带echo)。如果不存在,则页面为"about.html"。问题是,我已经搜索了,但我没有找到解决方案……致命错误:函数名必须是第63行index.php中的字符串。如果我进入一个不存在的页面(例如exampleindex.php?page=test)工作(打印"未找到"),但如果我进入一个存在的页面(例如index.php?Page =about或只是index.php)不起作用。这是代码:

        $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;

file_get_contents() not $file_get_contents()