Login   Register  
PHP Classes
elePHPant
Icontem

File: application/config/config.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alan H. Lake  >  tinyMVC  >  application/config/config.php  >  Download  
File: application/config/config.php
Role: Configuration script
Content type: text/plain
Description: Configuration information.
Class: tinyMVC
MVC based Web application framework
Author: By
Last change: Changed contents.
Date: 3 years ago
Size: 1,073 bytes
 

Contents

Class file image Download
<?php
// This primarily provides DEFINES to be used throughout the application.  This code shows two sets: one for an online server and one for a local server.  Note that the directories do not have to go where described here.  You must note where you do put them.

// DS is defined in application/public/index.php where this script is is also included.

$ip $_SERVER['SERVER_ADDR'];
$pos strpos($ip,'.');
if(
substr($ip,0,$pos) == 'xx') { // online.  xx is the first two digits of the online server's IP address.  
    
define('ROOT',DS.'var'.DS.'www'.DS.'vhosts'.DS.'sitename.com'.DS.'httpdocs'.DS);
    
define('TINY_MVC_DIR',ROOT.'tinyMVC'.DS);
    
define('PROJECT_ROOT_DIR',ROOT.'main'.DS);
    
define('PAGE_WIDTH','800px');
    
define('ROOT_URL','http://www.sitename.com/');
}else{
    
define('ROOT',DS.'home'.DS.'alan'.DS.'domains'.DS.'sitename.com'.DS.'httpdocs'.DS);
    
define('TINY_MVC_DIR',ROOT.'tinyMVC'.DS);
    
define('PROJECT_ROOT_DIR',ROOT.'main'.DS);
    
define('PAGE_WIDTH','800px');
    
define('ROOT_URL','http://erie/liw/');
}
?>