我已经在这里阅读了关于标题错误的众多帖子,并且全部通过Google阅读,但所提出的解决方案似乎都不是我需要的。我没有多余的空间;哎呀,我甚至没有发送一个标题(),但我仍然得到这个错误:
Warning: Cannot modify header information - headers already sent by (output started at header.inc.php:20)
header.inc.php的前21行是:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LocalKarma.org - What goes around comes around!</title>
<link rel="stylesheet" href="css/standardize.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" media="only screen and (max-width: 5in),
screen and (min-width: 200px) and (max-device-width: 640px) and (orientation:portrait) and (max-width: 5in),
screen and (min-width: 600px) and (max-device-width: 1280px) and (orientation:portrait) and (max-width: 5in),
screen and (min-width: 600px) and (max-device-width: 1280px) and (orientation:portrait) and (min-width: 6in)" href="css/mobile.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link href='http://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="scripts/html5shiv-printshiv.js"></script>
<![endif]-->
<?php
$pageName = $_SERVER['REQUEST_URI'];
我试过在DOCTYPE(第21行:$pageName = $_SERVER['REQUEST_URI'];
)之前移动我的部分php,所以在html之前会有php。不。我尝试更改所有代码,以便它是PHP输出,回显所有的HTML。不。由于这是一个包含文件,我已经查看了包含在此之前的其他包含,以及在其他包含之前包含此包含。不。还有......其他一些没有用的东西。
还有其他建议吗?我认为它非常简单,我只是没有看到它:)