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: 19 years ago
Size: 1,346 bytes
 

Contents

Class file image Download
<?php
/*
* @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
$ServerNavigator->setStartingFolder("../../");


// Sets a password protection to avoid anyone from seeing your server files
$ServerNavigator->setPassword("key");


// Creates a list of allowed IPs to increase protection
$ServerNavigator->addAllowedIP("127.0.0.1");
$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
$ServerNavigator->useImageIcons(true);


// 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"
$ServerNavigator->showSubfoldersSize(false);


// Shows server contents
$ServerNavigator->show();



?>