当前位置:Gxlcms > PHP教程 > php在网页登录成功后怎么实现网页跳转

php在网页登录成功后怎么实现网页跳转

时间:2021-07-01 10:21:17 帮助过:33人阅读

php在网页登录成功后实现网页跳转的方法:首先打开编辑器,新建php文件;然后在php文件中输入代码“header('Location: index.php');”;最后在浏览器运行,此时会跳转到index.php页面。

1、首先,打开编辑器,新建php文件,例如:index.php。

77094b36acaf2edd681ce208831001e938019366.png

2、在index.php中,输入代码:header('Location: index.php');。

562c11dfa9ec8a13189bc301f903918fa1ecc04a.png

3、浏览器运行login.php页面,此时会跳转到index.php页面。

f2deb48f8c5494ee15a19bf823f5e0fe98257e54.png

以上就是php在网页登录成功后怎么实现网页跳转的详细内容,更多请关注gxlcms其它相关文章!

人气教程排行