How to get all the current code from one php-file inside other php-file?
Like, we have file a.php with some functions inside.
And file b.php, where we want to get all the code (without running any functions) from a.php and echo it to the browser when requested.
Like
(inside b.php):
$content = get_all_file_text(a.php);
echo $content;
Thanks.
seems everyone so like file_get_contents, here is my suggestion as you try to output it to browser :
file_get_contents + highlight_string
http://php.net/manual/en/function.highlight-string.php