【发布时间】:2016-03-04 08:48:22
【问题描述】:
我的标题功能不起作用。 我创建了 2 页 test 和 test2
测试中的所有代码:
<?php
//header('Location ../index.php');
header("Location ./test2.php"); ?>
页面test2中的所有代码
<?php echo 'hello'; ?>
为什么我的功能不起作用?前面没有回声,这是最大的问题。这就是这两个页面中的所有代码。
谢谢
【问题讨论】:
-
你知道浏览器控制台里面的网络标签吗?
-
这是调用header函数的正确方法:: header('Location: example.com/');
-
此代码回显 aaaaaa 但标头功能不起作用。
if((!(isset($_SESSION['logged-in'])))){ header('Location: ../index.php'); echo 'aaaaaaaaaaa'; }
标签: php netbeans printing header