Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Include pliku w którym jest "<?xml version", Include pliku w ktorym <? =błąd
-metal-
post
Post #1





Goście







Witam,
Robie stronke w której mam plik index.php i chciałbym zapisać nagłówek xml i doctype w oddzielnym plilku który będzie łądowany przez include. Oto ten nagłówek:
  1. <?xml version="1.0" encoding="ISO-8859-2"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">


  1. <?php
  2.  
  3. include ('include/xml_header.php');
  4.  
  5. ?>

no i pojawia się błąd:
Kod
Parse error: parse error, unexpected T_STRING in /maciek/home/include/xml_header.php on line 1

Co jest według mnie związane z obecnością symbolu <?
No i co mam zrobić aby rozwiązać ten problem? Chce aby strona była zgodna z xhtml więc zalezy mi aby był ten nagłówek. Co proponujecie?

Z góry dzięki,

metal
Go to the top of the page
+Quote Post
angel2953
post
Post #2





Grupa: Zarejestrowani
Postów: 199
Pomógł: 5
Dołączył: 8.07.2004
Skąd: gdynia

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


w pliku xml_header.php daj echo:
  1. <?php
  2. echo '
  3. <?xml version="1.0" encoding="ISO-8859-2"?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  5. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6.  
  7. <html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
  8. ';
  9. ?>


php wszystko po tagu <? traktuje jako kod php, więc nie wie co to jest za funkcja xml

Ten post edytował angel2953 16.11.2005, 22:58:35
Go to the top of the page
+Quote Post
-metal-
post
Post #3





Goście







Dzieki (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Teraz dziala.
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 22.08.2025 - 16:22