I'm making a small application to let me edit files from my browser. Typically these will be PHP files. I'm trying to figure out a way that I can have PHP on the page whilst printing the contents of the file as text/plain so they are not executed.
I've looked into setting
header("content-type: text/plain");
However if I include this none of the PHP renders on the page, whilst I would like just the file I'm printing to be in plain text. I've also played about with code and pre tags to no avail as the server keeps executing the PHP.