PHP.nl

highlight_file

highlight_file

Syntax highlighting of a file

 **highlight_file** string $filename bool $return

Prints out or returns a syntax highlighted version of the code contained in using the colors defined in the built-in syntax highlighter for PHP. filename

Many servers are configured to automatically highlight files with a extension. For example, when viewed will show the syntax highlighted source of the file. To enable this, add this line to the httpd.conf: phps

AddType application/x-httpd-php-source .phps

filenamePath to the PHP file to be highlighted.

returnSet this parameter to true to make this function return the highlighted code.

If is set to true, returns the highlighted code as a string instead of printing it out. Otherwise, it will return true on success, false on failure. return

Let op: > Care should be taken when using the function to make sure that you do not inadvertently reveal sensitive information such as passwords or any other type of information that might create a potential security risk. highlight_file

highlight_stringHighlighting INI directives