ugrás a tartalomhoz

Warning: Cannot modify header information

vasz87 · 2009. Jún. 1. (H), 10.50
Helló mindenkinek!


Olyan kéréssel fordulok hozzátok, hogy van egy honlapom és van benne egy beléptető rendszer. Eleinte normálisan működőt és utánna kiírta a következő hibát:
Warning: Cannot modify header information - headers already sent by (output started at /export/cjb/user/majer/v/a/vasz87/login/login.php:5) in /export/cjb/user/majer/v/a/vasz87/login/login.php on line 12

Valaki esetleg tud nekem segíteni mert ennyire nem értek hozzá.
A hozzá szolásokat előre is köszönöm!
 
1

Lehetséges, hogy

Tanul0 · 2009. Jún. 1. (H), 11.09
Lehetséges, hogy átalakítottad UTF-8 kódolásúra? Mert ha igen, akkor UTF-8(BOM NÉLKÜL)-re tedd és jó lesz. Nálam ekkor volt hasonló probléma a login rendszerrel.
2

Nem

janoszen · 2009. Jún. 1. (H), 11.36
Nem, mert ha megnézed, nem az első sorban van az "output started". Sztem t. kérdező, keress rá itt a weblaboron, mert ha 200-szor nem volt kérdés, akkor egyszer sem.
3

nem találtam semmi jó segítséget

vasz87 · 2009. Jún. 1. (H), 16.53
Nekem ez a belépő rendszer 3 fájlból van össze rakni!Hol lehet a hiba?Így néznek ki:
config.php
<?php
//////////////////////////////////////////////////////
// Admin Login scripbt by: //
// FynexFox //
// //
// For questions and comments please contact me at: //
// AIM: FynexFox //
// MSN: FynexFox##kukac##hotmail.com //
// //
// Copyright 2005-Present, all rights reserved //
//////////////////////////////////////////////////////

$username = "****";//You should replace Usernamehere with your desired username
$password = "*****";//You should replace Passwordhere with the desired password
$location = "http:********";//The location that the person needs authenticiation to should replace www.location here.com
//DO NOT REMOVE THE HTPP://, also do an exact location, like: http://www.comcast.net/
$badinfo = "Sajnos most nem nyertél";//The message that should appear when the user information is bad should replace Die message //here
$noinfo = "Nincs info ide";//The message that should appear when one or more of the fileds are empty should replace No Info Here
?>

form.php
<form name="form1" method="post" action="">
<p>Felhasználónév:
<input name="userinput" type="text" id="userinput">
<br>
<br>
Jelszó:
<input name="passinput" type="password" id="passinput">
<br>
<br>
<input type="submit" name="Submit" value="Bejelentkezés">
<input type="reset" name="Reset" value="Törlés">
<input name="action" type="hidden" id="action" value="submit">
</p>
</form>

login.php
<html>
<body style="color: rgb(0, 0, 0); background-color: rgb(51, 102, 255);"
alink="#000099" link="#000099" vlink="#990099">
</body>
<?php
include('config.php');
if($action == "submit"){
if(($userinput == "")||($passinput == "")){
echo "$noinfo";
} else {
if(($userinput == $username)&&($passinput == $password)){header( "Location: $location" );
} else {
echo "$badinfo";
}
}
}
include('form.php') ;
?>

</html>




Előre is köszönömm a segitséget
4

Szomorú

janoszen · 2009. Jún. 1. (H), 17.08
Szomorú. Lehet, hogy először a Google használatával kellene mélyebben foglalkoznod. De ameddig az nem megy, elmondom dedikáltan Neked: a hibaüzenetet azért kapod, mert a kódban van kimeneted (HTML) a header függvényhívás elött. Két megoldás létezik: bekapcsolod az output bufferinget vagy átírod a kódot oly módon, hogy ez ne legyen szükséges. Nyomatékosan javaslom azonban, hogy mielőtt elkezdesz a netről mindenféle kétes minőségű kódot összevadászni, fogj egy PHP könyvet és ismerkedj meg a nyelv és a programozás alapjaival, annak ugyanis semmi értelme hogy bemásolj ide 60km kódot, amit nem értesz, megcsinálni ugyanis nem fogja senki helyetted.
5

kereső

gex · 2009. Jún. 1. (H), 17.21
ne mondd hogy itt nem volt semmi használható...