Welcome Guest, Not a member yet? Register   Sign In
[Solved] Website generator
#2

[eluser]dudeami0[/eluser]
For the first chunk of code, change

Code:
function parse_html($file, $data)  {
   ob_start();    
   $this->load->view($file, $data);
   $datasource = ob_get_contents();
   ob_end_clean();
   return $datasource;
}
to
Code:
function parse_html($file, $data)  {
   return $this->load->view($file, $data, true);
}

And the way you have this function wrote wont work (Nothing is echoed or printed so nothing is given :S) Change:

Code:
function getFile($filename) {
   ob_start();    
   file_get_contents($filename);
   $datasource = ob_get_contents();
   ob_end_clean();
   return $datasource;
}
to
Code:
function getFile($filename) {
   return file_get_contents($filename);
}


Messages In This Thread
[Solved] Website generator - by El Forum - 11-25-2010, 03:14 AM
[Solved] Website generator - by El Forum - 11-25-2010, 03:25 AM
[Solved] Website generator - by El Forum - 11-25-2010, 03:52 AM
[Solved] Website generator - by El Forum - 11-25-2010, 03:59 AM
[Solved] Website generator - by El Forum - 11-25-2010, 04:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB