I am currently working on the concept of symfony2. I want the html data to display the twig file in one file.
My code is:
$myfile = fopen("somefile.html", "w"); $data = $this->render("somefile.html.twig"); fwrite($myfile, $data);
This works fine, but in addition to the html data, I get the following line: "HTTP / 1.0 200 OK
Cache-control: no-cache
Date: Tue, 02 Jun 2015 07:50:16 GMT "
like looking lines that I want to delete, is this possible through symfony or am I using regex?
source share