^ Warning 1549: failed to load external entity "http://feeds.feedburner.com/iq/pFPO.xml" Line: 0 Column: 0 --------------------------------------------
Dodam, że dla innych plików xml funkcja działa ok. Co ciekawe jeśli zapiszę ten plik lokalnie jako: pFPO.xml i dam:
simplexml_load_file('pFPO.xml'); //też ok
Wie ktoś czym to może być spowodowane ?
// The actual XML parsing part libxml_use_internal_errors(true); $content = simplexml_load_file($table[$licznik]); //sciezka do pliku próbowałe: <a href="http://feeds.feedburner.com/iq/pFPO.xml" target="_blank">http://feeds.feedburner.com/iq/pFPO.xml</a> lub <a href="http://feeds.feedburner.com/iq/pFPO" target="_blank">http://feeds.feedburner.com/iq/pFPO</a> (nie działa) mimo, że przez przeglądarke odczytuje ok //if sth goes wrong if (!$content) { foreach(libxml_get_errors() as $error) { } libxml_clear_errors(); } switch ($licznik) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: //var_dump($content); foreach ($content->channel->item as $i => $item) { $title[] = $item->title; $tresc[] = $item->description; if ($item->enclosure) $foto[] = (string)$item->enclosure->attributes()->url; else $foto[] = ''; } $tytuly = losuj_synonim($tytuly, FALSE); $opisy = losuj_synonim($opisy, FALSE); foreach ($tit_arr as $klucz => $wartosc) { if ($foto[$klucz]) $des_arr[$klucz] = '<img src="'.$foto[$klucz].'" style="float:left; padding:5px 5px 5px 5px;" />'.$des_arr[$klucz]; }