PHP如何在父目录中的页面的头位置?
发布时间:2020-12-13 18:24:13 所属栏目:PHP教程 来源:网络整理
导读:我有一个first.php页面 header("Location: script/script1.php") 和script1.php有另一个 header("Location: first.php") 但它显然向我发送了/script/first.php. 有没有办法将它重定向到 root /first.php而不是 root /script/first.php? 尝试这个: header("
我有一个first.php页面
header("Location: script/script1.php") 和script1.php有另一个 header("Location: first.php") 但它显然向我发送了/script/first.php.
尝试这个:
header("Location: ../first.php") 或者使用绝对路径或网址. 说明:..是用于’父目录’的unix / linux表达式.互联网是unix土地,所以规则也适用于那里. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |