Jump to content

simplexml_load_file keeps loading same xml and won't let me load a new one


stevieontario

Recommended Posts

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?

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.