gpt4 book ai didi

php - 特定时间后的页面重定向 PHP

转载 作者:IT老高 更新时间:2023-10-28 11:53:36 24 4
gpt4 key购买 nike

有一个特定的PHP函数可以在一段时间后重定向。我在哪里看到过,但不记得了。就像登录后的gmail重定向一样。请问有人可以提醒我吗?

最佳答案

header( "refresh:5;url=wherever.php" );

这是设置 header 的 php 方式,它将在 5 秒内将您重定向到 wherever.php


Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include, or require, functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file. (source php.net)

关于php - 特定时间后的页面重定向 PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6119451/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com