PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Carlos Reche  >  Server Navigator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of how to use this class
Class: Server Navigator
Browse server side files and folders
Author: By
Last change:
Date: 17 years ago
Size: 1,346 bytes


Class file image Download
* @example of how to user ServerNavigator class

// Loads ServerNavigator class to this script
require_once "class.servernavigator.php";

// Starts $ServerNavigator object
$ServerNavigator = new ServerNavigator();

// Sets the starting folder that will be showed when running this script

// Sets a password protection to avoid anyone from seeing your server files

// Creates a list of allowed IPs to increase protection
$ServerNavigator->addAllowedIP("255.255.255.___"); // this will allow all IPs that starts
                                                   // with "255.255.255.(something)". It's
                                                   // useful for local nets.

// Hides all "mp3" and "mpg" files
$ServerNavigator->hideExtensions("mp3", "mpg");

// Sets if should use image icons (Apache servers only) or a HTML <div> icon

// Sets if ServerNavigator should get the real subfolder size. This takes more time if
// you have subfolders with many files, so the default set is "false"

// Shows server contents


For more information send a message to info at phpclasses dot org.