Support / KnowledgeBase

 
Search the KnowledgeBase Search

How do I enable .phps file to be color highlighted?

  • Applies to: (gs)

  • Difficulty: Easy

  • Time needed: 10 minutes

  • Tools needed: SSH, vi knowledge

 
  • Applies to: (gs)
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: SSH, vi knowledge

Overview

Due to the way PHP is configured on our (gs) platform, there is a work around to get a .phps file displaying colorized.

Instructions

You will need to add the following to your .htaccess and create the source.php file somewhere in you path.

Edit or create a .htaccess file in the root of the domain you want to host .phps files, then add this code to the .htaccess file:


Action php-source /test/source.php
AddHandler php-source .phps

Next, create a test/source.php file and add this to the file:

<? highlight_file($_SERVER{"DOCUMENT_ROOT"} . $_SERVER{"PATH_INFO"}) ?> 

Save the files and you will now be able the view the source of .phps files in color.


User Comments

No visitor comments posted. Post a comment
Fields marked with an asterisk(*) are required. Comment on this article
Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue