<?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/');
}
?>
|