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 Ivan Stojmenovic  >  Loader Class  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example how to use
Class: Loader Class
Automatically load MVC and library classes
Author: By
Last change: adding new coments!
Date: 2012-06-07 06:00
Size: 834 bytes
 

Contents

Class file image Download
<?php 
// Report all errors except E_NOTICE
//error_reporting(E_ALL ^ E_NOTICE);

//PATHS

define('SELF'pathinfo(__FILE__PATHINFO_BASENAME));
define('LIBPATH'str_replace("\\""/"'lib'.'/'));
define('APPATH'str_replace("\\""/"'app'.'/'));
define('LOGPATH'str_replace("\\""/"'logs'.'/'));
define('INCPATH'str_replace("\\""/"'include'.'/'));
define('CONFIGPATH'str_replace("\\""/"APPATH.'config'.'/'));

// MVC Path
define('CPATH'str_replace("\\""/"APPATH.'controllers'.'/'));
define('VPATH'str_replace("\\""/"APPATH.'views'.'/'));
define('MPATH'str_replace("\\""/"APPATH.'models'.'/'));
define('LPATH'str_replace("\\""/"APPATH.'library'.'/'));

// Extension
define('EXT','.php');

require_once 
LIBPATH 'loader'.EXT;  

$load = new Loader();