Is there some clever content-type setting that makes Firefox display highlighted HTML source code instead of rendering it? I have a CMS that generates HTML pages. I get debug info on each generated page by adding "/debug" to the URL. I would like to see the source by using "/source" so I have the source within my Firefox tabs (and not as an extra window).
I toyed with
ob_start()
and
highlight_string(ob_get_contents())
but it didn't work quickly, I find it too complicated and I like to avoid working with buffering when I can.
Maybe there is a simpler way to do this?
Edit: I will be using header("content-type: text/plain") for the time being but that doesn't highlight the code. I am looking for something like "content-type: text/html-source" or similar.)