次のようなコードがあります。
if (file_exists('my.xml')) {
$xml = simplexml_load_file('my.xml');
if($xml === NULL)
echo('ERR NULL $xml</br>');
else{
echo('> my.xml opened</br>');
print_r($xml);
}
}
foreach($xml->data->record as $records){
echo $records->data_to_retrive, PHP_EOL;
}
echo('> Ended</br');
これで、出力は次のようになります。
> my.xml opened
> Ended
それで、それの何が問題なのですか?なぜt show data_to_retrive, and print_r($xml) don
機能しないのですか?私はここで立ち往生し、ほとんど頭痛がしました。