Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [PHP]Problem z session
VirG
post
Post #1





Grupa: Zarejestrowani
Postów: 50
Pomógł: 0
Dołączył: 12.10.2010

Ostrzeżenie: (10%)
X----


Hi.

Mam problem z session, ponieważ na stronie ukazują się błędy:

Kod
Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at /home/str/public_html/admin/index.php:1) in /home/str/public_html/admin/index.php on line 2

Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /home/str/public_html/admin/index.php:1) in /home/str/public_html/admin/index.php on line 2


A to pierwsze 4 linijki strony:
  1. <?php
  2. session_register("zalogowany");
  3. if(empty($_SESSION["zalogowany"]))$_SESSION["zalogowany"]=0;
Go to the top of the page
+Quote Post
Michael2318
post
Post #2





Grupa: Zarejestrowani
Postów: 651
Pomógł: 116
Dołączył: 3.06.2012
Skąd: Lędziny

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


Pierw session_start() wrzuć.
Go to the top of the page
+Quote Post
nospor
post
Post #3





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Problem omawiany milion razy zarowno na forum jak i w google. Uzyj wyszukiwarki


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 19.08.2025 - 06:58