Welcome Guest, Not a member yet? Register   Sign In
Redirecting Output Class to a File
#1

[eluser]Eric Cope[/eluser]
I want to use the parser class and instead of outputting to the user, output to a file. Any ideas?
#2

[eluser]cahva[/eluser]
Use the third parameter to return the parsed content. So something like this:
Code:
file_put_contents('filename',$this->parser->parse('some_template', $data, TRUE));
#3

[eluser]Eric Cope[/eluser]
what about outputting views to a file?
#4

[eluser]cahva[/eluser]
Man, read the docs! Smile

Code:
file_put_contents('filename',$this->load->view('some_view', $data, TRUE));
#5

[eluser]Eric Cope[/eluser]
[quote author="cahva" date="1264627866"]Man, read the docs! Smile

Code:
file_put_contents('filename',$this->load->view('some_view', $data, TRUE));
[/quote]

You totally called me out... I and totally deserved it! Thanks :gulp:




Theme © iAndrew 2016 - Forum software by © MyBB