Posted by Matthew Weier O'Phinney on 08/04/05 19:34
* Steve Turnbull <sturnbull@yhgfl.net>:
> Is there a class or some code out there which enables you to print your
> PHP code to a web page and make it appear with syntax highlighting?
>
> As an example of what I am after, have a look here;
>
> http://www.phpfreaks.com/phpmanual/page/function.ldap-add.html
>
> Please note this is just an example page which highlights what I am after...
There's a few ways. highlight_file() and highlight_string() will do it.
Another way is to symlink to the .php file as extension .phps -- and
provide a link to the .phps file.
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
Navigation:
[Reply to this message]
|