Jump to content

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


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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.