So, I have a actions.class.php and have the function like that:
public function executeGetHTML($request)
{
$pageName = $request->getParameter('name', '');
}
I do not want to output the content of getHTMLSuccess.php
instead, depending on the request, I need to get the HTML code of another page (without processing it ..e.g. filtering it..etc). Actually, the page content will be output in JSONP within a JSON variable. e.g.
For example, I call /getHTML?name=abc
and abc.html (or abc.php) has the content:
<div>Hello, my beautiful world</div>
then I will get the page content of Hello, my beautiful world
and output it as: mycallback({content:'Hello, my beautiful world'});
I know I can do file_get_content(...) but it sounds like very heavy to do file read explicitly while symfony should already cache and know .
include / require won't work in this... so, is there a light-weight way to do it?