Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
highlight_file() function in PHP
The highlight_file() function outputs a file with the PHP syntax highlighted.
Syntax
highlight_file(file, return)
Parameters
file − The file name to display.
return − If this parameter is set to true, this function will return the highlighted code as a string, instead of printing it out. default is false.
Return
The highlight_file() function returns the highlighted code as a string instead of printing it. Returns true on success, or false on failure, otherwise.
Example
The following is an example, wherein we are using a test file ("new.php") to output the file with the PHP syntax highlighted.
Output
The output of the browser.
Advertisements
