Also ich habe ein Problem, dass bei einem folgenden Code immer der Fehler kommt, dass die session bereits auf zeile 15 aktiviert wurde, dabei ist der session_start() befehl auf zeile 15
Als Fehler kommt
(Quellcode)
HTML:
<head>
<title>Owned!</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="generator" content="Webocton - Scriptly" />
<meta http-equiv="refresh" content="1; URL=index.php" />
<?php
session_start();
?>
<style type="text/css">
body {
font-size:100px;
color:<?php if ( $_SESSION['tblack'] == true ) { echo 'white';
$_SESSION['tblack'] == false; } else { echo 'black'; $_SESSION['tblack'] ==
true; } ?>;
background-color:<?php if ( $_SESSION['bblack'] == true ) { echo 'black'; $_SESSION['bblack'] == false; } else { echo 'white'; $_SESSION['bblack'] == true; } ?>;
text-align:center;
}
</style>
</head>
<body>
<p>...Inhalt...</p>
</body>
</html>
(Quellcode)
Code:
<html>
<title>Owned!</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="generator" content="Webocton - Scriptly" />
<meta http-equiv="refresh" content="1; URL=index.php" />
<br />
<b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\1\index.php:10) in <b>C:\xampp\htdocs\1\index.php</b> on line <b>15</b><br />
<br />
<b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\1\index.php:10) in <b>C:\xampp\htdocs\1\index.php</b> on line <b>15</b><br />
<style type="text/css">
body {
font-size:100px;
color:black;
background-color:white;
text-align:center;
}
</style>
</head>
<body>
<p>...Inhalt...</p>
</body>
</html>