![]() |
|
The PhpHighlightPlugin pretty-prints PHP code using the php-function:highlight-string. UsageYou specify options for the plugin on the same line as the <?plugin, and put the code on the following lines, until the final ?>: <?plugin PhpHighlight [wrap?] [color options] code to be highlighted ?> DescriptionDepending on the wrap option, then the plugin will take care of adding <?php and ?> to the code before passing it to php-function:highlight-string. If the PHP delimiters were added, then the plugin removes them again from the highlighted string, before presenting it. Options
ExamplesPHP with default colors from php.ini:
function hello() {HTML with embedded PHPHere we have to use wrap=0 to prevent automatic wrapping, and escape '=?>=' as '=? >=':
<html>C SourceAlthough highlight_string() was designed with PHP code in mind it is suitable for basic syntax-highlighting of most C code because the two syntax are similar.
#include <stdio.h>AuthorsMartin Geisler gimpster@gimpster.com and Carsten Klapp carstenklapp@users.sourceforge.net. |
| Last edited on October 12, 2003. | Copyright © LOOKsystems Limited. All Rights Reserved. | ![]() |
|
|