[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: headers already sent
smalpik
Здравствуйте. Есть два файла:


index.php
<?php
include 'header.php';
?>
<body>...</body></html>

Работает нормально.

reg1.php
<?php $title = 'Регистрация';
include 'header.php';
?>
<body>
<
form action="reg.php" method="POST">
<
fieldset>
<
label for="name">Имя</label> <input type="text" name="name" size = "20"/><br />
<
label for="login">Логин</label> <input type="text" name="login" size = "20"/><br />
<
label for="pass">Пароль</label> <input type="password" name="pass" size = "20" /><br />
<
label for="mail">E-mail</label> <input type="text" name="mail" size = "20" /><br />
</
fieldset>
<
fieldset class = "center">
<
input type="submit" value="Отправить">
</
fieldset>
</
form>
</
body>
</
html>


Результат работы -Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at K:\home\kursach.ru\www\reg1.php:1) in K:\home\kursach.ru\www\header.php on line 1

header.php

<?php session_start();
if(isset($title))
{
echo '
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>'
;
echo $title;
echo '</title>
<!--<link rel="shortcut icon" href="">-->
<link href="style.css" rel="stylesheet" type="text/css">
</head>'
;
}
else
{
echo '
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Недвижимость</title>
<!--<link rel="shortcut icon" href="">-->
<link href="style.css" rel="stylesheet" type="text/css">
</head>'
;
}
?>


Запускается все под Денвером. У всех файлов кодировка UTF-8 без BOM. В чем проблема?
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2025 Invision Power Services, Inc.