Howdy... 🙂
I have tried several ways to get the content of the external file into a PHP variable... (fgets(), fread(), file_get_contents())
The problem that I am having is that the script works fine if I run the script with the plain text file like this...
$filename = 'news.txt';
$str = file_get_contents($filename);
echo("str = " . $str . "<BR>");
I get the all the strings just fine...
BUT that script gets rid of all the tags if I try to load the XML file... I do not want to parse the XML file... I just want to store the content of the XML file into a variable...
For example, this is a content of a XML file...
<news>
<submission1525December212004>
<title>Test4</title>
<date>15:26 - Tuesday, December 21, 2004</date>
<content>Test4</content>
</submission1525December212004>
</news>
and this displays this output...
str = 15:26 - Tuesday, December 21, 2004 Test4
As you can see, all the XML tags are stripped automatically...
Is this how it is supposed to be??? Is there any way I can read the whole XML content and store it into the variable??? 🙁
Thank you very much... 🙂