September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool highlight_file(string filename); Displays a file with PHP syntax highlighting.
Returns:
TRUE on success; FALSE on failure
Description:
highlight_file() is used to display a file with PHP syntax highlighting, using PHP’s built-in syntax highlighter. The syntax highlighting is applied using HTML tags. The function returns TRUE on success and FALSE on failure.
The colors used for highlighting can be set in the php.ini file. They can also be set using the ini_set() function (see the example).
Caution:
When a file is displayed using highlight_file(), all of the content of the file will be displayed—including passwords and any other sensitive information.
Availability:
UNIX/Linux, Windows
Version:
4+
See also:
To highlight ...
Read now
Unlock full access