PHP中如何实现页面跳转至指定其他页面?
- 内容介绍
- 文章标签
- 相关推荐
本文共计520个文字,预计阅读时间需要3分钟。
PHP实现页面跳转的方法:在PHP脚本中添加代码`header('location:网址')`即可。若要延迟跳转,代码为`header('Refresh:秒数;url=网址')`。
php实现一个页面跳转到其它页面的方法:在php脚本中添加代码即可。如果要延迟跳转,代码为。
本文操作环境:windows10系统、php 7.3、thinkpad t480电脑。
在PHP脚本代码中实现
<?php header("location:url地址") ?>
例如
<?php header("location:helloworld.php") ?>
页面会立即跳转,因为header执行了location重定向。
本文共计520个文字,预计阅读时间需要3分钟。
PHP实现页面跳转的方法:在PHP脚本中添加代码`header('location:网址')`即可。若要延迟跳转,代码为`header('Refresh:秒数;url=网址')`。
php实现一个页面跳转到其它页面的方法:在php脚本中添加代码即可。如果要延迟跳转,代码为。
本文操作环境:windows10系统、php 7.3、thinkpad t480电脑。
在PHP脚本代码中实现
<?php header("location:url地址") ?>
例如
<?php header("location:helloworld.php") ?>
页面会立即跳转,因为header执行了location重定向。

