0

I need to do source code formatting (similar to what Stack Overflow does), but on the server side. What options do I have? My serverside language could be PHP or JSP. Does google have a server version of syntaxhighlighter?

gameover
  • 11,813
  • 16
  • 59
  • 70
  • possible duplicate of [PHP syntax highlighting](http://stackoverflow.com/questions/230270/php-syntax-highlighting) – j0k Mar 26 '13 at 09:03
  • I suggest you refer to [this question](http://stackoverflow.com/questions/230270/php-syntax-highlighting) for a PHP solution. – Franz Nov 20 '09 at 09:16

2 Answers2

0

Try enscript. I use it to for syntax-highlighted printouts, but it also generates html, rtf and even ANSI codes.

$ enscript -w html -o program.html program.c

it's a standalone utility, so you can use it from any language.

codehead
  • 2,077
  • 16
  • 20
0

Use GeSHi. With over 150 languages supported is my favourite syntax highlight solution for PHP :)

napolux
  • 15,574
  • 9
  • 51
  • 70