Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> problem simplexml_load_file();
SN@JPER^
post
Post #1





Grupa: Zarejestrowani
Postów: 266
Pomógł: 0
Dołączył: 4.01.2007
Skąd: Szczecin

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


Witam,

nie wiem czemu wyskakują mi takie błędy:

Warning: simplexml_load_file() [function.simplexml-load-file]: xml.xml:1: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xFC 0x73 0x73 0x65 in D:\Serwer\httpd\xml\floor.php on line 8

Warning: simplexml_load_file() [function.simplexml-load-file]: pe>2W</OddsType><OddsData><HomeTeam>Artland Dragons</HomeTeam><AwayTeam>Giants D in D:\Serwer\httpd\xml\floor.php on line 8

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in D:\Serwer\httpd\xml\floor.php on line 8

Warning: simplexml_load_file() [function.simplexml-load-file]: xml.xml:2: parser error : expected '>' in D:\Serwer\httpd\xml\floor.php on line 8

etc.

Kod:

  1. <?php
  2.  
  3.  $xml = simplexml_load_file('xml.xml');
  4.  
  5.  
  6.  
  7.  
  8.  foreach($xml as $floor)
  9.  {
  10.    echo $floor->Sport;
  11.  }
  12.  
  13. ?>
Go to the top of the page
+Quote Post
Rafal Filipek
post
Post #2





Grupa: Zarejestrowani
Postów: 274
Pomógł: 54
Dołączył: 2.05.2006
Skąd: Nadarzyn

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


Jak dla mnie to masz, ze to tak kolokwialnie ujmę 'walnięty' plik xml. na 100% masz coś nie tak z kodowaniem znaków ( ma byc utf-8 a jest coś innego ) co wynika z pierwszego błędu. być może pozostałe są następstwem pierwszego. Dużo łatwiej pewnie by było jakbyś pokazał xml'a.
Go to the top of the page
+Quote Post
SN@JPER^
post
Post #3





Grupa: Zarejestrowani
Postów: 266
Pomógł: 0
Dołączył: 4.01.2007
Skąd: Szczecin

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


bet-at-home.com/oddxml.aspx?extended=true
Go to the top of the page
+Quote Post

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: 21.08.2025 - 23:32