Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [xHTML]Poprawność kodu
adrianozo
post
Post #1





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Witam.
Postanowiłem sprawdzić kod xHTML w walidatorze. Wyskoczyły mi 2 błędy tej samej treści tylko w innych linijkach.
Treść błędów:

1.
Kod
Warning DOCTYPE Override in effect!

The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" has been suppressed and the DOCTYPE for "XHTML 1.0 Transitional" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.


2.
Kod
Info Using Direct Input mode: UTF-8 character encoding assumed

Unlike the "by URI" and "by File Upload" modes, the "Direct Input" mode of the validator provides validated content in the form of characters pasted or typed in the validator's form field. This will automatically make the data UTF-8, and therefore the validator does not need to determine the character encoding of your document, and will ignore any charset information specified.

If you notice a discrepancy in detected character encoding between the the ?Direct Input? mode and other validator modes, this is likely to be the reason. It is neither a bug in the validator, nor in your document.


Nie za bardzo wiem o co chodzi. Jeśli mógłby ktoś pomóc byłbym bardzo wdzięczny smile.gif

EDIT:

Ustawiając ENCODING i DOCTYPE na automatyczne wyrzuca tylko błąd nr 2

Kod
Info Using Direct Input mode: UTF-8 character encoding assumed

Unlike the "by URI" and "by File Upload" modes, the "Direct Input" mode of the validator provides validated content in the form of characters pasted or typed in the validators form field. This will automatically make the data UTF-8, and therefore the validator does not need to determine the character encoding of your document, and will ignore any charset information specified.

If you notice a discrepancy in detected character encoding between the the ?Direct Input? mode and other validator modes, this is likely to be the reason. It is neither a bug in the validator, nor in your document.


Ten post edytował adrianozo 18.11.2009, 18:42:51


--------------------
Go to the top of the page
+Quote Post
2 Stron V   1 2 >  
Start new topic
Odpowiedzi (1 - 19)
Meares
post
Post #2





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


Na początku każdego dokumentu HTML musi byc zamieszczony jego "doctype".
Ramy dokumentu - www.kurshtml.boo.pl

Ten post edytował Meares 18.11.2009, 19:31:07


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
adrianozo
post
Post #3





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Takie coś mam smile.gif


--------------------
Go to the top of the page
+Quote Post
Gryf
post
Post #4





Grupa: Zarejestrowani
Postów: 170
Pomógł: 40
Dołączył: 14.08.2008
Skąd: Katowice

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


z tych sprawdź czy plik na pewno jest kodowany w UTF-8 oraz DOCKTYPE <- jaki masz?
Go to the top of the page
+Quote Post
adrianozo
post
Post #5





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Nie rozumiem twojej wypowiedzi Gryf.
Mógłbyś jaśniej?


--------------------
Go to the top of the page
+Quote Post
Meares
post
Post #6





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


  1. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
Masz takie coś w kodzie?


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
adrianozo
post
Post #7





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Takie coś

  1. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />


--------------------
Go to the top of the page
+Quote Post
Meares
post
Post #8





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


Powinno być "Content-Type", a nie "Content-type". winksmiley.jpg Wielkość ma znaczenie. tongue.gif


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
adrianozo
post
Post #9





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Poprawione, ale ostrzeżenie dalej wyskakuje


--------------------
Go to the top of the page
+Quote Post
wiewiorek
post
Post #10





Grupa: Zarejestrowani
Postów: 247
Pomógł: 11
Dołączył: 5.09.2009

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


Meareas może nie w temacie, ale mógłbyś zacząć używać UTF-8 tongue.gif
Adrianozo wklej tu całą sekcję <head>.

Ten post edytował wiewiorek 18.11.2009, 20:03:23
Go to the top of the page
+Quote Post
Meares
post
Post #11





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


Używam, ale nie chciało mi się tego zmieniać. (Linijkę przekopiowałem w kurshtaml.boo.pl zwyczajnie) tongue.gif


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
adrianozo
post
Post #12





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


  1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  2. <meta http-equiv="Content-Language" content="pl" />
  3. <title>MEDBook Store</title>
  4. <link rel="stylesheet" type="text/css"
  5. media="all" href="style.css" />
  6. </head>


--------------------
Go to the top of the page
+Quote Post
Meares
post
Post #13





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


Zapomniałem. haha.gif Na samym początku dokumentu xHTML musisz mieć następującą linijkę:
  1. <?xml version="1.0" encoding="utf-8" ?>


EDIT: I teraz widzimy, że nawet na www.kurshtml.boo.pl są małe błędy. winksmiley.jpg

Ten post edytował Meares 18.11.2009, 20:21:10


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
adrianozo
post
Post #14





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Oto jest od początku smile.gif
  1. <?xml version="1.0" encoding="utf-8"?>


--------------------
Go to the top of the page
+Quote Post
potreb
post
Post #15





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

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


To info które wkleiłeś to nie żaden błąd tylko informacja o walidacji.


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

Go to the top of the page
+Quote Post
Meares
post
Post #16





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


Kuźwa... Już wiem gdzie jest problem. -.-' Problemem jest to, że walidujesz ten kod metodą "Direct Input", czyli wklejeniem kodu na W3C Validator. Jeśli zapiszesz plik i użyjesz metody File Upload, nic nie powinno wyskoczyć (jeśli oczywiście reszta pliku jest poprawna).


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
adrianozo
post
Post #17





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Nie mogę przez File Upload ponieważ większość w skrypcie to PHP i wyrzuca błędy z nim związane smile.gif


--------------------
Go to the top of the page
+Quote Post
Meares
post
Post #18





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

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


To wrzuć na serwer i poprzez "via URI".


--------------------
manual mmocenter
Nie pomagam na PW!
Go to the top of the page
+Quote Post
l0ud
post
Post #19





Grupa: Zarejestrowani
Postów: 1 387
Pomógł: 273
Dołączył: 18.02.2008

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


Wywal tą linię z <?xml na początku, tego ma nie być.

Zainstaluj ten dodatek: https://addons.mozilla.org/pl/firefox/addon/60 i waliduj poprzez Narzędzia -> Sprawdź poprawność lokalnego pliku HTML smile.gif


--------------------
XMPP: l0ud@chrome.pl
Go to the top of the page
+Quote Post
adrianozo
post
Post #20





Grupa: Zarejestrowani
Postów: 733
Pomógł: 4
Dołączył: 11.11.2009

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


Cytat(Meares @ 18.11.2009, 20:39:28 ) *
To wrzuć na serwer i poprzez "via URI".


Tak samo jak z File Upload


--------------------
Go to the top of the page
+Quote Post

2 Stron V   1 2 >
Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 12:10