Ho preso questo sistema mai fatto ma non sa cosa sta succedendo!Errore nel file xml fine prematura dei dati nel tag
linea: 197 core.php
foreach ($this->getAll() as $banner) {
linea: 191 core.php
$_xmlBanners = simplexml_load_file(PATH_XML."banners.xml");
mio xml:
<?xml version="1.0" encoding="UTF-8"?>
<list>
<banner id="1">
<image>http://lineagefree.com/acp/images/l2jbr.png</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='list_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="2">
<image>http://lineagefree.com/acp/images/top100mmorpg.png</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="3">
<image>http://lineagefree.com/acp/images/gamesitestop100.jpg</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
<banner id="4">
<image>http://lineagefree.com/acp/images/arenatop100.png</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
<banner id="5">
<image>http://lineagefree.com/acp/images/mmorpglist.jpg</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
<banner id="6">
<image>http://lineagefree.com/acp/images/top200.gif</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
</list>
miei errori Retorn:
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: /home/lineage/public_html/acp/xml/banners.xml:48: parser error : Opening and ending tag mismatch: banner line 33 and list in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: </list> in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: ^in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: /home/lineage/public_html/acp/xml/banners.xml:48: parser error : Premature end of data in tag banner line 26 in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: </list> in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: ^in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: /home/lineage/public_html/acp/xml/banners.xml:48: parser error : Premature end of data in tag banner line 19 in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: </list> in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: ^in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: /home/lineage/public_html/acp/xml/banners.xml:48: parser error : Premature end of data in tag list line 2 in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: </list> in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: ^in /home/lineage/public_html/acp/core.php on line 191
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Notice: Trying to get property of non-object in /home/lineage/public_html/acp/core.php on line 206
[23-Aug-2013 15:35:20 America/Sao_Paulo] PHP Warning: Invalid argument supplied for foreach() in /home/lineage/public_html/acp/core.php on line 197
Sono con questo problema. sentito parlare di caratteri codificati. qualcosa. ma come posso risolvere? segue tutti i dati. se ne hai bisogno di più, per favore chiedimi Sono disperato. Scusa per il mio inglese. è stato fatto con google! grazie
Chiudi il tag banner e aggiungi un tag di chiusura e questo viene convalidato correttamente. – dcaswell
Sarebbe molto meglio se ci fosse un argomento per ignorare (e magari aggiungere) i tag mancanti. – geotheory