0
我的链接样本看起来像这样“/jet/index.php?year=2011 & quarter = Q1” 现在我需要显示包含第一个月的页面季度之一2011年。 /jet/index.php?year=2011 &季度= Q1将显示四月五月六月。等等。通过url中的多个变量显示一个页面
我的代码看起来像这样
<a href="index.php?year=2011&quarter=Q1">
<a href="index.php?year=2011&quarter=Q2">
<a href="index.php?year=2011&quarter=Q1">
<a href="index.php?year=2011&quarter=Q4">
我的主页,这是2012年的作品就好了,这里是代码
<?php
$quarters = array('Q1' => 'firstq2012.php', 'Q2' => 'secondq2012.php', 'Q3' => 'thirdq2012.php', 'Q4' => 'fourthq2012.php');
if(isset($_GET['quarter'])) {
if(in_array($_GET['quarter'], array_keys($quarters))) {
include_once $quarters[$_GET['quarter']];
} else {
header('Location: 404.php');
}
} else {
include_once $quarters['Q3'];
}
?>
我需要你的帮助,我会从过渡2012年至2011年会看起来像(我通过链接)
谢谢!
很难解释你的问题 – asprin 2012-07-31 11:05:49
在你上线之前:http://www.aeonity.com/frost/how-preventing-remote-file-inclusion-exploits-php – madflow 2012-07-31 11:16:24