Very Simple Code Viewer

ExhibiThis is a very simple code viewer. Just a single php file. It recursively displays all files in the same directory skipping itself.

ExhibiThis uses google-code-prettify to display requested files, which is not included here. Instead, ExhibiThis uses JavaScript link to load it from:
See original project at google-code-prettify

View Code


  1. Create a folder for example: code
  2. Upload ExhibiThis.php to "code"
  3. Within "code" create a folder for your project: My-Project
  4. Within "My-Project" create a file "index.php" or any other name
  5. Make a hyperlink to index.php

Example: Content of index.php file

include '../ExhibiThis.php';

$exhibiConf = array (
# If 'project' is not specified then parent folder name is displayed.
 'project'    => 'Project Name',
 'code_dir'   => '/directory-containing-your-code',
 'wrap_code'  => true  # Wraps code
 'scroll_code'=> true, # Wrap the page in div for scrolling
 'header'     => true, # Prints header and wraps in html tag
 'home'       => '/project-website-directory/index.html',
 'download'   => '/download-page.html',
 'version'    => 'Version of the project',
 'date'       => 'Release Date',
 'authors'    => 'Your Name',
 'copyright'  => 'Your Copyright',
 'license'    => 'Your License',
 'description'=> 'Page description', # Ignored if header is not specified
 'keywords'   => 'Page keywords',    # Ignored if header is not specified

# associative array text => link
 'other_links'=> array(
   'Link Text' => '/page.html',

# folders to exclude from listing
 'exclude_dir' => array(

# files to exclude from listing
 'exclude_files' => array(

 $exhibiThis = new ExhibiThis($exhibiConfig);
 echo $exhibiThis->Execute();


To produce a complete sitemap of your code, substitute the last two lines above for the following code.

$exhibiThis = new ExhibiSitemap($exhibiConfig);
echo $exhibiThis->Execute(__FILE__);

ExhibiThis Highlights

  • Single php file
  • Recursively displays all files and folders using google-code-prettify
  • Easy to integrate
  • Easy to customise
  • Supports "exclude" directory and files
  • Supports download binary and links to images
  • Can be standalone application or become a part of html page


Follow the links to