请问在php中如何实现网页的跳转啊? if(****)header("Location:index.php"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if(($result['userid']==$username)&&($result['password']==$password)) { echo "welcom to webside"; echo "<br>"; echo "<table>"; echo "<tr><td>"; echo "<a href=index.html?userid=".$username."'>"; echo "主页"; echo "</td></tr><table>"; } else{ echo "<script language=\"Javascript\">"; echo "alert('the userid not correct,please checked it first');"; echo "history.back(); "; echo "</script>"; } ?>下面这种方法更直接if(($result['userid']==$username)&&($result['password']==$password)) { echo "<script language=\"Javascript\">"; echo "location.href='../index.html'"; echo "</script>"; } else{ echo "<script language=\"Javascript\">"; echo "alert('the userid not correct,please checked it first');"; echo "history.back(); "; echo "</script>"; } ?> 如果我有index.php,我想从index.php跳转到test.php,但我不想在跳转后地址栏显示为test.php,要求地址栏里显示的还是index.php,能实现吗?怎么实现?跪求! 那你可以在登陆成功后就不要跳专了啊,直接require(test.php);不久可以了吗? 原来如此,我刚接触PHP,很多东西都还不懂.多谢hahawen! 用header("location:index.php");如果单纯是刷新跳转(即非条件跳转)可以使用<meta http-equiv="refresh" content="60;url=http://xylegend.myrice.com">其中content定义跳转时间(秒),url定义跳转页面 我在index.php里使用require(admin.php)实现了跳转,可是使用当我使用admin.php里的一条语句时出现了问题,该语句如下:<a href=\"?action_admin=adduserinfo\"><font size=2>添加</font></a>地址栏里转到的是index.php?action_admin=adduserinfo而不是我想要的admin.php?action_admin=adduserinfo,也就是说它又跳回到了index.php页面上了,请问如何解决啊? 呵呵,搞定了,我强行在?action_admin=adduserinfo的前面加上了admin.php <meta http-equiv="refresh" content="TIME;url=[http://]***.***"> php 判断时间大小 帮忙推荐个isapi_rewrite的实例教程 apache+php cgi问题 站内公告如何设计? 关于SVN 更新的问题,咨询一下 求类似关于用php通过emilcar邮件接口自动发送邮件的代码,帮帮忙啊急着用! 菜鸟问题,在线等待:提示某某不是对象,运行期错误!请问这一般是什么问题?谢谢帮忙! HTML格式入库问题 如何下载FTP文件? 谁在用PHP进行面向对象编程?请给举一个PHP多形性的例子OK? 函数能不能返回数组 刚入门,请教一个关于数据传递的问题!!
{
echo "welcom to webside";
echo "<br>";
echo "<table>";
echo "<tr><td>";
echo "<a href=index.html?userid=".$username."'>";
echo "主页";
echo "</td></tr><table>";
}
else{
echo "<script language=\"Javascript\">";
echo "alert('the userid not correct,please checked it first');";
echo "history.back(); ";
echo "</script>";
}
?>
下面这种方法更直接
if(($result['userid']==$username)&&($result['password']==$password))
{
echo "<script language=\"Javascript\">";
echo "location.href='../index.html'";
echo "</script>";
}
else{
echo "<script language=\"Javascript\">";
echo "alert('the userid not correct,please checked it first');";
echo "history.back(); ";
echo "</script>";
}
?>
多谢hahawen!
如果单纯是刷新跳转(即非条件跳转)可以使用
<meta http-equiv="refresh" content="60;url=http://xylegend.myrice.com">
其中content定义跳转时间(秒),url定义跳转页面