Dear All, I 'm facing a problem while using SimpleXML new.php <?php echo "Hello1"; $xml = simplexml_load_file("test.xml"); echo "Hello2"; ?> test.xml <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> The 2 files are in the same folder: the first hello message is echoed, while the second is not, as if there is a problem with the following $xml = simplexml_load_file("test.xml"); I can't find a reason for this error
That looks like valid code (XML and PHP) to me, so most likely it will be be something simple. Try replacing $xml = simplexml_load_file("test.xml"); Code (markup): With $xml = simplexml_load_file('test.xml') or die('<br/>An error has occured'); Code (markup): Run the script and copy the output into the nw reply
Thanks for your kind attention. well i tried this replacement However, I still got only the first Hello1 message. Even, die message is not displayed. Could it be a problem with the server? Is it for a certain php version, that my server should support it? and how do i know this.
No, i guess this is the problem I know nothing about simpleXML installation. Can you tell me how to do this? Note: the server is a remote server, a yahoo one, i can only access it with filezilla.
Yahoo <- That's where the problem lies. What version of PHP are you running there? I've heard they only support 4. (It's pre-installed on PHP 5+)
well, let me check with the server administrator, and see what we can do. Thank you very much for your kind attention