06 November 2009

One core, many apps

Edit this ~/www/ampcake/app/webroot/index.php

CAKE_CORE_INCLUDE_PATH can either be relative (../../core) or absolute (/path/to/core)

For our case, 'cakephp' stores the 'cake' library. This works for both dev and live environment.

if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if ($_SERVER['SERVER_NAME'] == 'localhost') {
define('CAKE_CORE_INCLUDE_PATH', '..' . DS . '..' . DS . 'cakephp');
} else {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
}

No comments: