Is there a way to display the source code of somepage.php when you go to somepagesrc.php? IOW, is there a PHP function that will in somepage
somepage.php
somepagesrc.php
somepage
Take a look at highlight_file(). It not only grabs the php source to display (like file_get_contents()) but nicely formats/colorizes the code for output.
highlight_file()
file_get_contents()
http://php.net/manual/en/function.highlight-file.php