PHP gevorderde |
|
Oke die php5 versie heb ik maar krijg daar volgende errors:
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 28: parser error : Start tag expected, '<' not found in /home/anime2le/public_html/ver/valid/index.php on line 41
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: in /home/anime2le/public_html/ver/valid/index.php on line 41
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/anime2le/public_html/ver/valid/index.php on line 41
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/anime2le/public_html/ver/valid/index.php:41 Stack trace: #0 /home/anime2le/public_html/ver/valid/index.php(41): SimpleXMLElement->__construct('???????????????...') #1 {main} thrown in /home/anime2le/public_html/ver/valid/index.php on line 41
$xmlstr = simplexml_load_file('http://www.pimpponyrape.com/Angelic%20Layer/bestanden.xml');
$xml = new SimpleXMLElement($xmlstr);
$sMedia = mysql_query("SELECT id, naam, path FROM `anime_series` ORDER BY id DESC")
or die(mysql_error());
if(mysql_num_rows($sMedia) != 0)
{
$i=0;
while ( $data = mysql_fetch_array ( $sMedia ) )
{
$arr[$i]["id"] = $data["id"];
$arr[$i]["naam"] = $data["naam"];
$arr[$i]["datum"] = $xml->file[0]->datum;
$i++;
}
function cmp($a, $b)
{
return strcmp($a["datum"], $b["datum"]);
}
usort($arr, "cmp");
}
$xmlstr = simplexml_load_file('http://www.pimpponyrape.com/Angelic%20Layer/bestanden.xml'); $xml = new SimpleXMLElement($xmlstr); $sMedia = mysql_query("SELECT id, naam, path FROM `anime_series` ORDER BY id DESC") { $i=0; { $arr[$i]["id"] = $data["id"]; $arr[$i]["naam"] = $data["naam"]; $arr[$i]["datum"] = $xml->file[0]->datum; $i++; } function cmp($a, $b) { return strcmp($a["datum"], $b["datum"]); } }
|