Get all content from a file, including PHP code
<p>I'm making a small CMS for practice. I am using CKEDITOR and is trying to make it avaliable to write something like %contactform% in the text, and then my PHP function will replace it with a contactform.</p>

<p>I've accomplished to replace the text with a form. But now I need the PHP code for the form to send a mail. I'm using file_get_contents(); but it's stripping the php-code.</p>

<p>I've used include(); to get the php-code from another file then and that works for now. I would like to do it with one file tho.</p>

<p>So - can I get all content from a file INCLUDING the php-code?</p>

<p>*<em>UPDATE *</em> </p>

<p>I'll try to explain in another way.</p>

<p>I can create a page in my CMS where I can write a header and some content. In the content I am able to write %contactform%.</p>

<p>When I get the content from the database I am replacing %contactform% with the content from /inserts/contactform.php, using file_get_contents(); where I have the form in HTML and my php code:</p>

<pre><code>if(isset($_POST['submit'])) {
  echo 'Now my form is submitted!';
}

&lt;form method="post"&gt;
  &lt;input type="text" name="email"&gt;
  &lt;input type="submit" name="submit"&gt;
&lt;/form&gt;
</code></pre>

<p>Now I was expecting to retrieve the form AND the php code active. But If I press my submit button in the form it's not firing the php code.</p>

<p>I do <strong>not</strong> wan't to show the php code I want to be able to <strong>use</strong> it.</p>
