Source Viewer - Help

Version 1 - The latest version is always available from www.softswot.com
Copyright © softSWOT 2004

Software is available Free of Charge.

  1. Overview
  2. Instructions for Use
  3. Trouble Shooting
  4. Requirements for Use
  5. Try Source Viewer
  6. Download Source Viewer
  7. Install / Uninstall
  8. Registration
  9. Conditions of Use
  10. Software Support and Contact Details

Overview

Source Viewer is a php coded web page allowing you to display the html and php source code of files on your server in a standard browser. Using standard browser View Source functions php is not displayed as it is processed by the server prior to the page being delivered to the browser. Source Viewer allows this code the be displayed.

Source Viewer runs on your web server. To run Source Viewer your server must support the php scripting language. Most commercial web servers support php. For information on php and how to check if it is available on your server goto What is php?

Key Features

Instructions for Use - Source Viewer

Download Source Viewer and if required adjust the User Configuration Settings by opening the file sourceviewer.php in a text editor or uploading it to your server and using your server's file edit function. At the top of the file adjust the User Configuration Settings to nominate Allowed Directories. By default the only Allowed Directory is the directory in which the Source Viewer is located. The source code (including php) of any file in an Allowed Directory can be viewed using the Source Viewer. If you only wish to view files in the Source Viewer directory then no configuration is required.

User Configuration Settings

At the top of the file sourceviewer.php is php code. This includes the following User Configuration Settings below the line #### Start User Configuration Settings:

You can adjust these settings to suit your requirements. Only these settings should be adjusted. Any other changes could corrupt functionality. A description and example is provided below for each setting. The following variables can be user defined by opening this file in a text editor or using your server's file edit function and adjusting the values.

Allow View in Current Directory - $allowcur = 'true';

To set the directory in which sourceviewer.php is located to Allowed leave the default value as true. This allows the source of files located in the same directory as sourceviewer.php to be displayed. For example:

To prevent the source of files in the same directory in which sourceviewer.php is located from being viewed set:

Alternatively you can leave the variable empty:

Allowed Directories - $allowdirs = array();

You can add allowed directories to the array() as '/directorypath'. Each allowed directory must be separated by a comma. For example:

If you do not wish to add Allowed directories leave the setting as the default value:

View URL

Once any configuration adjustments have been made upload the sourceviewer.php file to your server. Then simply open it in your browser. To view a file source code input the URL of the required file into the text field and click the View URL html and php Code button. Use the full URL address of the file you want to view. For example:

The source code of this page will be displayed when you click the View URL html and php Code button.

Trouble Shooting

Take Care when modifying and uploading you file to ensure the php coding is not corrupted. If your Source Viewer does not run when you submit check the form action. When you view sourceviewer.php in your test editor the form tag is:

<form action="<?php echo "$_SERVER['PHP_SELF']"; ?>" method="post">

The action is php code telling the form to load itself. When this is run on the server the action becomes the Source Viewer file name. If the form action is missing the php code may have been corrupted when you edited or uploaded the file. To overcome this you can manually set the form action to the file name i.e.:

<form action="sourceviewer.php" method="post">

Requirements for Use

Source Viewer runs on your web server. To run Source Viewer your server must support the php scripting language. Most commercial web servers support php. For information on php and how to check if it is available on your server goto What is php?

If your downloaded software is compressed (.zip) it will require unzipping for use. Trial Zip software is available free from Winzip or a simple freeware zip utility is available from JustZIPit.

Try Source Viewer

A sample version of Source Viewer is available at Try Source Viewer. This allows you to preview the software without installing it on your server.

Download Source Viewer

You can Download Source Viewer Free of Charge.

If your downloaded software is compressed (.zip) it will require unzipping for use. Trial Zip software is available free from Winzip or a simple freeware zip utility is available from JustZIPit.

To install simply unzip or run the downloaded file then follow the Instructions for Use.

Install / Uninstall

Source Viewer runs on your web server. To run Source Viewer your server must support the php scripting language. Most commercial web servers support php. For information on php and how to check if it is available on your server goto What is php?

Please Note: Source Viewer includes php scripting which may be corrupted by some html editors. It is recommended that a text editor is used for all modifications. If you wish to use a html editor we recommend (and use) HTML-Kit. HTML-Kit is a free standards compliant editor that unlike most html editors (Front Page, DreamWeaver etc) produces clean valid html and will not corrupt php scripts.

Once you have made your modifications save your form file and upload it to your web server. Then open Source Viewer in your browser i.e www.myserver.com/sourceviewer.php.

Registration

Source Viewer is provide Free of Charge, and no registration is required. All links to www.softswot.com and copyright notices should be retained.

Conditions of Use

The specific suitability of this software must be independently assessed. Software is provided as is, use is entirely at the users risk, and use acknowledges that softSWOT and all associated parties are held harmless from any claims or losses relating to software provided.

All links to www.softswot.com and copyright notices should be retained.

Software Support and Contact Details

For items not addressed here, in the online Help or in our Frequently Asked Questions page please Contact Us.

Web Site: www.softswot.com

softSWOT
15 Island View Court
Buderim
Queensland, 4556, Australia.

softSWOT is a member of the Bizpep Group
ABN: 24 312 166 103

Telephone: +61 7 5445 5325

Regards
David Morcom
www.softswot.com