December 29, 2011
How to include a file in Codeigniter?
Question by joomlearner
I have an xml file, inside views folder and I want read it, before I load the view.
for example
views
default/
info.xml
How to do this?
Answer by Starx
Very Simple. Load the file using this
$xmlData = $this -> load -> file("application/views/default/info.xml", true);
Now use the data, where needed.