![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 208 Pomógł: 0 Dołączył: 5.03.2005 Ostrzeżenie: (20%) ![]() ![]() |
Powiedzcie mi jak to jest z tym XHTML'em.
Chcę na stronie zgodnej z XHTML 1.1 zamieścić skrypt php. I tu jest problem ponieważ stronę muszę zapisać jako *.php aby skrypt się wykonał i wtedy validator wypisuję coś takiego: Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service. The Content-Type field is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as ".html") to MIME Content-Type values (such as text/html). That you recieved this message can mean that your server is not configured correctly, that your file does not have the correct filename extension, or that you are attempting to validate a file type that we do not support yet. In the latter case you should let us know that you need us to support that content type (please include all relevant details, including the URL to the standards document defining the content type) using the instructions on the Feedback Page. Oto początek mojej strony, powiedzcie gdzie tkwi problem: <?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-2\"?>"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl"> <head> |
|
|
![]()
Post
#2
|
|
Administrator PHPedia.pl Grupa: Developerzy Postów: 1 102 Pomógł: 2 Dołączył: 14.09.2003 Ostrzeżenie: (0%) ![]() ![]() |
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 208 Pomógł: 0 Dołączył: 5.03.2005 Ostrzeżenie: (20%) ![]() ![]() |
Niestety to nie pomogło
|
|
|
![]()
Post
#4
|
|
Grupa: Przyjaciele php.pl Postów: 5 724 Pomógł: 259 Dołączył: 13.04.2004 Skąd: N/A Ostrzeżenie: (0%) ![]() ![]() |
W jaki sposob wysylasz strone do walidatora? Podajac mu linkam, czy uploadujac plik? Czy plik przes przetworzony przez php?
|
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 208 Pomógł: 0 Dołączył: 5.03.2005 Ostrzeżenie: (20%) ![]() ![]() |
poprzez upload z komputera
|
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 453 Pomógł: 22 Dołączył: 20.09.2004 Skąd: Kraków - NH - Ostrzeżenie: (0%) ![]() ![]() |
jeśli uploadujesz plik do validatora zmień rozszerzenie z php na html. napewno zadziała.
|
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 208 Pomógł: 0 Dołączył: 5.03.2005 Ostrzeżenie: (20%) ![]() ![]() |
ok dzięki wrzuciłem plik na serwer i validator się już nie czepia
|
|
|
![]()
Post
#8
|
|
Grupa: Przyjaciele php.pl Postów: 5 724 Pomógł: 259 Dołączył: 13.04.2004 Skąd: N/A Ostrzeżenie: (0%) ![]() ![]() |
Czyli wysylales mu plik *.php przed przepuszczeniem go przez serwer? Wtedy validator musi spradzac KOD php a nie XHTML.
Albo wrzuc plik na serwer (tak jak zrobiles) albo otworz go u siebie na serwerze i z przeglladarki zapisz go na dysk i dopiero to wyslij (uploaduj). |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 208 Pomógł: 0 Dołączył: 5.03.2005 Ostrzeżenie: (20%) ![]() ![]() |
a dlaczego musiałem dodać ten wpis, żeby zaczeło działać ?
header('Content-Type: text/html'); |
|
|
![]()
Post
#10
|
|
Administrator PHPedia.pl Grupa: Developerzy Postów: 1 102 Pomógł: 2 Dołączył: 14.09.2003 Ostrzeżenie: (0%) ![]() ![]() |
Cytat The Content-Type field is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as ".html") to MIME Content-Type values (such as text/html). Przecież jest napisane (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) |
|
|
![]()
Post
#11
|
|
Grupa: Zarejestrowani Postów: 184 Pomógł: 0 Dołączył: 19.01.2005 Skąd: Bochnia Ostrzeżenie: (0%) ![]() ![]() |
Cytat(kapral @ 2005-03-05 19:35:55) a dlaczego musiałem dodać ten wpis, żeby zaczeło działać ? header('Content-Type: text/html'); Jeżeli piszesz w XHTMLu 1.1 to ma być tak: Kod header('Content-Type: application/xhtml+xml'); w starszych wersjach możesz dać text/html |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 14:39 |