Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Błąd "headers already sent"
misterious
post 2.01.2013, 19:50:24
Post #1





Grupa: Zarejestrowani
Postów: 52
Pomógł: 2
Dołączył: 7.10.2012

Ostrzeżenie: (0%)
-----


Witam serdecznie!
Jestem w trakcie tworzenia strony w php, jednak napotkałem błędy:
  1. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/reklamow/public_html/funkcje/wyloguj.php:10) in /home/reklamow/public_html/funkcje/wyloguj.php on line 13
  2. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/reklamow/public_html/funkcje/wyloguj.php:10) in /home/reklamow/public_html/funkcje/wyloguj.php on line 13

po utworzeniu skryptu wylogowania:
  1. <head>
  2. <title>blablabla</title>
  3. <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">
  4. <link media="screen" type="text/css" href="stylesheet.css" rel="StyleSheet">
  5. <link href='http://fonts.googleapis.com/css?family=Playfair+Display+SC&subset=latin,cyrillic,latin-ext' rel='stylesheet' type='text/css'>
  6. </head>
  7. <body>
  8. <div id="index_info">
  9. <center>
  10. <?php
  11.  
  12.  
  13. if($_SESSION['zalogowany'])
  14. {
  15.  
  16. $_SESSION['zalogowany'] = false;
  17. $_SESSION['myusername'] = '';
  18. $_SESSION['dbpass'] = '';
  19. $_SESSION['rank'] = '';
  20. $_SESSION['email'] = '';
  21. $_SESSION['kolor'] = '';
  22. $_SESSION['group_id'] = '';
  23. echo '<font size=15px><b>Zostałeś poprawnie wylogowany! <a href="logowanie.php">Powrót</a></b></font>';
  24. }
  25. else
  26. {
  27. echo '<font size=15px><b>Nie byłeś zalogowany! <a href="logowanie.php">Powrót</a></b></font>';
  28. }
  29. ?>
  30. </div>
  31. </body>

Czy możecie mi powiedzieć co jest nie tak?
Na darmowym hostingu (CBA.PL) to działa, ale na proserwer.pl niestety nie sad.gif
Wersja PHP: 5.3 (5.3.18)
Go to the top of the page
+Quote Post

Posty w temacie
- misterious   [PHP]Błąd "headers already sent"   2.01.2013, 19:50:24
- - Monter08   [PHP] pobierz, plaintext <?php ob_start(...   2.01.2013, 19:54:33
- - misterious   Ten sam błąd   2.01.2013, 19:55:26
- - Spawnm   Było setki razy, poszukaj. Zamykam.   2.01.2013, 19:56:08


Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 09:46