title: Symfony Question: How to get/read the HTML content of a page?
body: <p>So, I have a actions.class.php and have the function like that:</p>
  
  <pre><code>public function executeGetHTML($request)
  {
     $pageName = $request-&gt;getParameter('name', '');
  }
  </code></pre>
  
  <p>I do not want to output the content of getHTMLSuccess.php</p>
  
  <p>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. </p>
  
  <p>For example, I call  /getHTML?name=abc</p>
  
  <p>and abc.html (or abc.php) has the content:</p>
  
  <pre><code>&lt;div&gt;Hello, my beautiful world&lt;/div&gt;
  </code></pre>
  
  <p>then I will get the page content of Hello, my beautiful world</p>
  
  <p>and output it as:  mycallback({content:'Hello, my beautiful world'});</p>
  
  <p>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 .</p>
  
  <p>include / require won't work in this... so, is there a light-weight way to do it?</p>