PHP Classes

File: index.php

Recommend this page to a friend!
  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: 11 years ago
Size: 834 bytes


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


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

LIBPATH . 'loader'.EXT;

$load = new Loader();