No more `showsource.php`

Some 250 people (this month alone) have tried to access my old script to show the source of PHP scripts. Showing the source of a PHP script in a colorful way is trivial using the highlight_file() function, which is a built-in PHP function.

My little script had just a small amount of extra functionality: it tried to find URLs and file names and substituted them with links. Unfortunately this is such a crude hack that I’ve removed the file.

For much better replacements, please see the PEAR Text_Highlighter class (support for 11 languages) or the Generic Syntax Highlighter (support for 35 languages).

Hmm, all this reminds me that I still haven’t installed a plugin to let me do syntax highlighting in my own posts…

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI (optional)
Your Comment (smaller size | larger size)

Formatted using Markdown: use blank lines to separate paragraphs, * for emphasis, and backticks (`) around code.

(Googlebot visited this page Saturday, December 17, 2005)