我需要帮助解决这个问题。我有一个代码稍后会更改标题位置,如下所示:
header('Location: http://www.matrixgamingns.com/changepassword.php?success');
它不工作。当我使用该行时,我 localhost 没问题,并且它应该像它一样工作。它看起来像这样:
header('Location: changepassword.php?success');
现在,当它在线时,它不想重新加载或重定向页面。幸运的是,我打开了错误报告,这就是我得到的:
警告:无法修改标头信息 - 标头已由 /hermes/bosweb/web039/b397/ipg.matrixgamingnscom/ 中的 /hermes/bosweb/web039/b397/ipg.matrixgamingnscom/public_html/recover.php:7 发送的标头第 44 行的 public_html/recover.php
没关系,我知道出了什么问题...但是当我遇到错误时,该行是我的 php 包含。像这样:
<?php include 'php/includes/headstart.php'; ?>
最疯狂的部分是其中包括我没有可以像错误状态一样重定向的东西。包含的php:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/reset.css" type="text/css" />
<meta http-equiv="content-type" content="text/html" charset="UTF-8">
<meta name="language" content="serbian">
<script src="js/jquery.js"></script>
<link rel="shortcut icon" href="images/favicon.ico" />
包含文件的 PHP 代码:
<?php
include 'php/db/connection.php';
include 'php/db/init.php';
protect_page();
?>
<?php include 'php/includes/headstart.php'; ?>
<title>Matrix Gaming</title>
<meta name="description" content="Matrix Gaming Internet Cafe je mesto gde mozete doci da se druzite sa prijateljima ili se mozda odlucite da se suprotstavite nekome u nekoj od mnogobrojnih igrica
u nasoj ponudi">
<?php include 'php/includes/headend.php'; ?>
如果有人可以帮助我,我会非常感激!