Forum Moderators: coopster
However, you can get the contents of a file as easily as you can include that file as a separate action.
file_get_contents [php.net] is handy for reading a file into a variable and more information about the include function [php.net] is a worthwhile read as it includes an alternate method (using output buffering) to include a PHP file into a string.
Try with this code:
ob_start();include('index.php');
$content = ob_get_contents();
ob_end_clean();
Hope this helps! :)