Welcome Guest, Not a member yet? Register   Sign In
File Referencing
#1

[eluser]zimco[/eluser]
Given my CI application fetched an html page and wrote it all back to a file i called XYZ-2008-03-12.html in a folder htmlcache.

Now i want to access that file from a controller to pick out one form embedded in the html.

I have a function that will get only the form from the html, but how would i reference the file for the function?

Full URL like http://localhost/ci/system/application/h...03-12.html or can i just pass it the path to the file like /public_html/ci/system/application/htmlcache/XYZ-2008-03-12.html?
#2

[eluser]Tom Glover[/eluser]
Is the cache Generated by CI or another method, if it is reference her to the CI cache manual: HERE
#3

[eluser]zimco[/eluser]
No, i just named the folder htmlcache, it's not using the CI cache system at all. The files in the folder are static html files.
#4

[eluser]webthink[/eluser]
You be able to access it through the server path.
using CI's file helper try
$this->load->helper('file');
$string = read_file(APPPATH.'/htmlcache/XYZ-2008-03-12.html');




Theme © iAndrew 2016 - Forum software by © MyBB