双 GET 方法路由器问题


Double GET method Router Issue

if($_GET){
    $way = 'theme/page/';
    $extension = '.php';
    $content = $yol . strip_tags(trim($_GET['sayfa'])) . $uzanti;
    require_once "$content";
    }
if($_GET){
        $way = 'tema/information/';
        $extension = '.php';
        $content = $yol . strip_tags(trim($_GET['information'])) . $uzanti;
        require_once "$content";
        }

我有两种不同的 GET 方法形式。如何在一页上检查两者。

你能试试这个吗,

为各个条件添加了 isset($_GET['sayfa']) 和 isset($_GET['information'])。

     if(isset($_GET['sayfa'])){
        $way = 'theme/page/';
        $extension = '.php';
        $content = $yol . strip_tags(trim($_GET['sayfa'])) . $uzanti;
        require_once "$content";
     }
    if(isset($_GET['information'])){
            $way = 'tema/information/';
            $extension = '.php';
            $content = $yol . strip_tags(trim($_GET['information'])) . $uzanti;
            require_once "$content";
     }