可能重复:
PHP 已发送的标头
这些是错误:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers
already sent by (output started at
C:\xampp\xampp\htdocs\ProjSecond\includes\overall\Oheader.php:3) in +
C:\xampp\xampp\htdocs\ProjSecond\core\init.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter -
headers already sent (output started at
C:\xampp\xampp\htdocs\ProjSecond\includes\overall\Oheader.php:3) in
C:\xampp\xampp\htdocs\ProjSecond\core\init.php on line 2
我在不同的目录中构建我的项目,相关文件的代码如下:
文件:初始化:
<?php
session_start();
require 'database/connect.php';
?>
文件: 标题:
<body>
<?php include 'includes/header.php';?>
文件: 头:
<head>
<title>Project47</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/pjcss.css">
</head>
有谁知道为什么会这样……上面显示的代码是每个文件的全部内容