Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Epsilon Alexey  >  uClassDir  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Main startup and example file
Class: uClassDir
Locate and load PHP classes
Author: By
Last change:
Date: 2009-07-26 11:51
Size: 1,069 bytes
 

Contents

Class file image Download
<?php

/**
 * index.php file of UltimaPHP
 *
 * @package UltimaPHP Core (http://ultimaphp.ru)
 * @author Epsilon 2009/05/23
 */

// Before first run, create directory named "auto" in the root.

$root dirname(__FILE__);

require_once(
$root.'/config.php');

if ((
$GLOBALS['uconfig']['core']['productionmode']) || (isset($_GET['make']))) {
    require_once(
$root.'/core/uclassdir.class');
    
$x = new uClassDir();
    
$x->recreate($GLOBALS['uconfig']['core']['classdir'], $GLOBALS['uconfig']['core']['autodir'].'/uclassloaderindex.class');
}

require_once(
$root.'/core/ukernel.class');


//.............. Your code down here ................
//

// Simple test. Just kill it later. Notice: no need "require's", "include's" after this point.

header("Content-type: text/plain");

$a = new TestClass1();
echo 
$a->getValue()."\n";

$b = new TestClass2();
echo 
$b->multiplyByValue(457)."\n";

/**
 * Never close php files with "?>".
 * It will protect you from unexpected space/TAB/CR chars before <HTML> tag or dynamic image data. 
 */