【发布时间】:2013-06-13 10:20:20
【问题描述】:
所以我基本上试图让它像:?p=blabla&dep=blabla
switch($_GET['p'])
{
case 'home':
include("template/index.html");
break;
case null:
include("template/index.html");
break;
case 'roster':
include("template/roster.html");
break;
case 'about':
include("template/about.html");
break;
case 'members':
include("members/index.php");
break;
}
if(($_GET['p'] == 'about') && ($_GET['dep'] == 'hospital'))
{
include("template/hospital.html");
}
当我做 blablabla?p=about&dep=hospital 时,它仍然包括 about.html 和 hospital.html
我该如何解决这个问题?
【问题讨论】:
标签: loops get switch-statement case break