![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 14 Pomógł: 0 Dołączył: 30.11.2011 Ostrzeżenie: (0%) ![]() ![]() |
Witam dzisiaj dopadł mnie kolejny problem. (zapewne błachy)
Otóż piszę spolszczenie w index.php dodałem linijkę Cytat <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> Pliki Zapisuję i edytuje( w postaci UTF-8) NotePad++ . Gdy wrzucam na serwer powstają nastepujące błędy Kod Warning: Cannot modify header information - headers already sent by (output started at /homepages/33/d349171117/htdocs/hosting/header.php:1) in /homepages/33/d349171117/htdocs/hosting/header.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at /homepages/33/d349171117/htdocs/hosting/header.php:1) in /homepages/33/d349171117/htdocs/hosting/header.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /homepages/33/d349171117/htdocs/hosting/header.php:1) in /homepages/33/d349171117/htdocs/hosting/header.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /homepages/33/d349171117/htdocs/hosting/header.php:1) in /homepages/33/d349171117/htdocs/hosting/header.php on line 6 Warning: Cannot modify header information - headers already sent by (output started at /homepages/33/d349171117/htdocs/hosting/header.php:1) in /homepages/33/d349171117/htdocs/hosting/header.php on line 7 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/33/d349171117/htdocs/hosting/header.php:1) in /homepages/33/d349171117/htdocs/hosting/header.php on line 11 Myślę iz bład leży w tej linijce kodu: Kod <?php header("ETag: PUB" . time()); header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5) . " GMT"); header("Pragma: no-cache"); header("Cache-Control: max-age=1, s-maxage=1, no-cache, must-revalidate"); session_cache_limiter("nocache"); ob_start(); session_start(); Wie ktoś jak rozwiązać problem? Ps. szukałem po googlach lecz nie znalazłem dosadnej odpowiedzi Znalazłem jeszcze takie coś lecz gdzie to wstawic? Kod $LANGUAGE_PACK = array();
$LANGUAGE_PACK["site_charset"] = 'UTF-8'; Ten post edytował xeron01 3.12.2011, 00:53:52 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 127 Pomógł: 15 Dołączył: 16.02.2008 Skąd: Sanok Ostrzeżenie: (0%) ![]() ![]() |
Pliki Zapisuję i edytuje( w postaci UFO-8) NotePad++ . UTF-8 (IMG:style_emoticons/default/wink.gif) Przekonwertuj na UTF-8 bez BOM-a. Przeczytaj przy okazji co to jest BOM. |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 14 Pomógł: 0 Dołączył: 30.11.2011 Ostrzeżenie: (0%) ![]() ![]() |
UTF-8 (IMG:style_emoticons/default/wink.gif) Przekonwertuj na UTF-8 bez BOM-a. Przeczytaj przy okazji co to jest BOM. Sory za literówke na górze jest dobrze chodziło mi o UTF-8 bład dalej jest |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 286 Pomógł: 12 Dołączył: 23.11.2006 Skąd: WL Ostrzeżenie: (0%) ![]() ![]() |
założe się że w pliku index.php masz to na samej górze <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> a później includujesz headera.php
...funkcja header jak i session_start musi zostać wykonana przed wysłaniem nagłówków.. tak więc musisz trochę pozmieniać.. Ten post edytował szmerak 3.12.2011, 06:48:44 |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 14 Pomógł: 0 Dołączył: 30.11.2011 Ostrzeżenie: (0%) ![]() ![]() |
Moh header.php wygląda nastepująco: dalej są błedy na stronie...
Kod <?php
header("ETag: PUB" . time()); header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5) . " GMT"); header("Pragma: no-cache"); header("Cache-Control: max-age=1, s-maxage=1, no-cache, must-revalidate"); session_cache_limiter("nocache"); ob_start(); session_start(); if(!isset($__installer_mode)){ require_once("inc/config.php"); // include("email.php"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="description" content="<?=$config[MetaDesc]?>" /> <meta name="keywords" content="<?=$config[MetaWords]?>" /> |
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 286 Pomógł: 12 Dołączył: 23.11.2006 Skąd: WL Ostrzeżenie: (0%) ![]() ![]() |
Z tym kodem jest wszystko w porządku...
Jeśli includujesz headera gdzieś później dla przykładu w index.php, upewnij się że nie wyświetlasz nic przed nim... jak i również czy nie ma spacji przed znacznikiem php " <?" Ponieważ każdy taki znak jest wyświetlany jako html przed wywołaniem skryptu... |
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 14 Pomógł: 0 Dołączył: 30.11.2011 Ostrzeżenie: (0%) ![]() ![]() |
Hmm mam dziwny problem ponieważ przerzuciłem pliki na darmowy hosting cba i wszystko działa bez błedów. Jednak gdy TE SAME pliki przerzucę do siebie na serwer błędy nadal są.
Hmm niemogąc znalesc rozwiązania pomyślałem: usunę te błedy: Kod header("ETag: PUB" . time()); header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5) . " GMT"); header("Pragma: no-cache"); header("Cache-Control: max-age=1, s-maxage=1, no-cache, must-revalidate"); session_cache_limiter("nocache"); ob_start(); session_start(); wywaliłem wszystko powyzej i błedów nie było...a polskie znaki normalnie sie wczytywały.Tylko ze opcje data , zalogowanie itp nie działały , więc mozna zmienić ten kod tak aby działał? Prosze o dokładne instrukcje jak to naprawic ;< Ten post edytował xeron01 3.12.2011, 22:46:35 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 13:23 |