I built a site using simpleXML to pull content from XML pages.
I just switched the site to the client server and the pages that pull from the XML sheet don't work anymore.
Testing server was PHP version 5.2.9
Client server is PHP version 5.2.5
allow_url_fopen
is on for both servers.
Any ideas?
class award{
var $xml;
var $awards;
function titles(){
$this->fullArticle();
$xml=simplexml_load_file("awards.xml");
foreach($xml->award as $currentAward){
$titles=$currentAward->title;
echo '<li><a href="';
base_url();
echo 'about/awards.php?award=';
echo $titles;
echo '">' . str_replace(array('<h1>','</h1>'), '', $currentAward->$titles->h1->asXML()) . '</a></li>';
}
}
function fullArticle(){
$awards=array();
$xml=simplexml_load_file("awards.xml");
foreach($xml->award as $currentAward){
array_push($awards, $currentAward->title);
}
return($awards);
}
function articleBlock($awardy){
$xml=simplexml_load_file("awards.xml");
foreach($xml->award as $currentAward){
if($currentAward->title = $awardy ){
echo str_replace(array('<'.$awardy.'>','</'.$awardy.'>'), '', $currentAward->$awardy->asXML());
}
}
}
}