Syntax highlighting of a file using php highlight_file function

Prints out or returns a syntax highlighted version of the code contained in filename using the colors defined in the built-in syntax highlighter for PHP. Care should be taken when using the highlight_file() 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 ( string $filename [, bool $return = falseĀ  ] )

Example: Browser view : http://snaps.php.net/
Browser Source : http://snaps.php.net/index.php?source

About Midhun Devasia

I'm a 26 year old Web Developer from Cochin, India.I had completed my B.Tech Computer Science and Engineering from SNGCE, Cochin. Now am working as a Technical Manager for a Web Development company at Cochin, India . I have 1 year experience in Java and 3 year experience in Web Technologies.
This entry was posted in PHP and tagged , . Bookmark the permalink.

One Response to Syntax highlighting of a file using php highlight_file function

  1. nithin says:

    its a nice article ,good work da

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>