stevieontario Posted April 23, 2009 Share Posted April 23, 2009 I am testing code on a test server (Apache, with xampp) using the simplexml_load_file function, but cannot test the same code with a different xml file. I keep getting the error message "Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity". I tried removing the original xml file (file.xml) entirely from the original directory, but it still won't let me test the code with another xml file in the same directory. Meanwhile, the code continues to successfully execute when I put the original filename into the expression (i.e., simplexml_load_file('file.xml') -- even though I have deleted file.xml and it no longer exists on my computer. Anybody have an idea what's going on? Quote Link to comment https://forums.phpfreaks.com/topic/155365-simplexml_load_file-keeps-loading-same-xml-and-wont-let-me-load-a-new-one/ Share on other sites More sharing options...
jonsjava Posted April 23, 2009 Share Posted April 23, 2009 sounds like you're testing from a sandbox, and the file you removed is in a different file than what you are thinking. Just a guess. Quote Link to comment https://forums.phpfreaks.com/topic/155365-simplexml_load_file-keeps-loading-same-xml-and-wont-let-me-load-a-new-one/#findComment-817402 Share on other sites More sharing options...
stevieontario Posted April 23, 2009 Author Share Posted April 23, 2009 thanks jonsjava, well don't I feel like an idiot! I didn't know that xampp puts all test stuff into its own directory (different from my own site directory). So I deleted THAT, and problem solved. Much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/155365-simplexml_load_file-keeps-loading-same-xml-and-wont-let-me-load-a-new-one/#findComment-817422 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.