<?php
$zy = 6;
$p = isset($_GET[‘p‘]) ? $_GET[‘p‘] : 1;
$up = $p-1;
$down = $p+1;
if($up == 0){
?>
<a href="javascript">上一页</a>
<?php
}else{
?>
<a href="inter1.php?p=<?php echo$up;?>">上一页</a>
<?php
}
?>
<?php
for($i = 1;$i<=$zy;$i++){
if($p == $i){
?>
<a href="inter1.php?p=<?php echo$i;?>" class="acti"><?php echo$i;?></a>
<?php
}else{
?>
<a href="inter1.php?p=<?php echo$i;?>" class=""><?php echo$i;?></a>
<?php
}
}
?>
<?php
if($down >$zy){
?>
<a href="javascript">下一页</a>
<?php
}else{
?>
<a href="inter1.php?p=<?php echo$down;?>">下一页</a>
<?php
}
?>