![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 59 Pomógł: 0 Dołączył: 2.03.2008 Ostrzeżenie: (10%) ![]() ![]() |
Witam.
Potrzebuje odczytac dane z pliku *xml. Dokładnie pola name i file. przeglądałem już manuala, testowałem ale za każdym razem wychodzą jakies błędy. Czy ktoś może pomoc jak odczytac te dany?
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 59 Pomógł: 0 Dołączył: 2.03.2008 Ostrzeżenie: (10%) ![]() ![]() |
Zaglądałem do manuala...
Teoretycznie wszytko działa ładnie gdy xml jest zmienna definiowaną w pliku php, lecz gdy otwieram plik poprzez simplexml_load_file to już wyskakują błędy: Kod Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 202: parser error : Start tag expected, '<' not found in C:\Program Files\WebServ\httpd\tablice\kk.php on line 44 Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: in C:\Program Files\WebServ\httpd\tablice\kk.php on line 44 Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in C:\Program Files\WebServ\httpd\tablice\kk.php on line 44 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\Program Files\WebServ\httpd\tablice\kk.php:44 Stack trace: #0 C:\Program Files\WebServ\httpd\tablice\kk.php(44): SimpleXMLElement->__construct('?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) ...') #1 {main} thrown in C:\Program Files\WebServ\httpd\tablice\kk.php on line 44 Skrypt wyglada następująco:
Sam sobie poradziłem. W bardziej prosty sposób. Oto kod dla potomnych:
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 26.09.2025 - 22:13 |