matrix1977: Dateiendung .hmtl .xhtml .php

Beitrag lesen

hi,
wenn ich ganz am Anfang der php-Datei
header("Content-type: application/xhtml+xml; charset=UTF-8");
einfüge, dann kommt folgenden Fehlermeldung:

Warning: Cannot modify header information - headers already sent by (output started at /test_float.php:1) in /test_float.php on line 2

Die php-Datei sieht so aus:

<?php
header("Content-type: application/xhtml+xml; charset=UTF-8");
print "<?xml version="1.0" encoding="UTF-8"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">

<head>
  <meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />
  <title>bla bla</title>
  <link rel="StyleSheet" href="teststyle_float.css" type="text/css" media="screen" >
 </head>

<body>