Welcome Guest, Not a member yet? Register   Sign In
loading a view vs. loading a file


I'm trying to work with an xml file that I created. I was using simplexml_load_file (I've got PHP 5 installed) and was getting an error so I thought I'd use the CI load library functions.

If I try this in my controller:
I get an error: "Unable to load the requested file: filter.xml"

If I try this instead:
Everything seems to work.

Can anyone explain why either the simplexml call or the CI load->file call aren't working? It seems like the other two methods are looking for me to identify the directory differently.

If it matters, my directory structure is:


I'm using the .htaccess file from the CI wiki (Elliot Haughin's)

load->file goes from the root directory (which contains system, user_guide, index.php etc) whilst load->view goes from application/views.

Ahh....awesome...everything works now. Thanks very much!

Theme © iAndrew 2016 - Forum software by © MyBB