When I use file_get_contents() function on a local file, the result contains php code, though I need HTML only.
Content of the file being read:
<?php echo '<p>Hello</p>';?>
And the result of file_get_contents called from a different file located in the same folder:
<?php echo file_get_contents('test.php'); //returns the following: string(31) "Hello'; ?>"
If I read a file from an external server, it returns HTML - as I would expect. So the question is: how do I get HTML output from the local file? Thank you all.