我index.php 页面上有
<li> <a href="resuindex.php?w=1">星期一</a></li><li> <a href="resuindex.php?w=2">星期二</a></li><li> <a href="resuindex.php?w=3">星期三</a></li><li> <a href="resuindex.php?w=4">星期四</a></li><li> <a href="resuindex.php?w=5">星期五</a></li><li> <a href="resuindex.php?w=6">星期六</a></li><li> <a href="resuindex.php?w=7">星期日</a></li>
$w = isset($_GET['w'])? $_GET['w'] : '';if(!in_array($w, array(1,2,3,4,5,6,7))){ echo 'w error'; exit();}// 执行查询db语句,然后输出
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号