這裏是我的代碼我用switch語句包含特定的文件,但它包含了「默認」,也
<?php
$id = isset($_GET['id']) ? $_GET['id'] : '';
switch ($id) {
default:include_once('default.php');
break;
case 'actiune':include('jocuri/actiune/index.php');
break;
case 'aventura':include('jocuri/aventura/index.php');
break;
}
?>
<!--games-->
<?php
$game = isset($_GET['game']) ? $_GET['game'] : '';
switch ($game) {
case 'nz':include('jocuri/actiune/ninja-vs-zombie/index.php');
break;
case 'aventura':include('/jocuri/aventura/index.php');
break;
}
?>
所以,當我嘗試存取權限的情況下「NZ」從它也包括從頂部默認。那麼我怎麼能只包含'nz'的情況呢?
+1更好的解釋! –