- Timestamp:
- 08/30/2008 02:36:37 PM (3 months ago)
- Files:
-
- 1 modified
-
branches/website/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/website/index.php
r2785 r3400 56 56 /** 57 57 * If you rename all of your .php files to a different extension, set the new 58 * extension here. This option can left to .php, even if this file ishas a58 * extension here. This option can left to .php, even if this file has a 59 59 * different extension. 60 60 */ … … 64 64 // DO NOT EDIT BELOW THIS LINE, UNLESS YOU FULLY UNDERSTAND THE IMPLICATIONS. 65 65 // ---------------------------------------------------------------------------- 66 // $Id: index.php 2005 2008-02-09 06:07:53Z PugFish$66 // $Id: index.php 3366 2008-08-27 22:15:39Z Shadowhand $ 67 67 // 68 68 69 69 // Define the front controller name and docroot 70 70 define('DOCROOT', getcwd().DIRECTORY_SEPARATOR); 71 define('KOHANA', substr(__FILE__, strlen(DOCROOT))); 71 define('KOHANA', basename(__FILE__)); 72 73 // If the front controller is a symlink, change to the real docroot 74 is_link(KOHANA) and chdir(dirname(realpath(__FILE__))); 72 75 73 76 // Define application and system paths … … 79 82 unset($kohana_application, $kohana_modules, $kohana_system); 80 83 81 (is_dir(APPPATH) AND is_dir(APPPATH.'/config')) or die 82 ( 83 'Your <code>$kohana_application</code> directory does not exist. '. 84 'Set a valid <code>$kohana_application</code> in <tt>'.KOHANA.'</tt> and refresh the page.' 85 ); 84 if ( ! IN_PRODUCTION) 85 { 86 // Check APPPATH 87 if ( ! (is_dir(APPPATH) AND is_file(APPPATH.'config/config'.EXT))) 88 { 89 die 90 ( 91 '<div style="width:80%;margin:50px auto;text-align:center;">'. 92 '<h3>Application Directory Not Found</h3>'. 93 '<p>The <code>$kohana_application</code> directory does not exist.</p>'. 94 '<p>Set <code>$kohana_application</code> in <tt>'.KOHANA.'</tt> to a valid directory and refresh the page.</p>'. 95 '</div>' 96 ); 97 } 86 98 87 (is_dir(SYSPATH) AND file_exists(SYSPATH.'/core/'.'Bootstrap'.EXT)) or die 88 ( 89 'Your <code>$kohana_system</code> directory does not exist. '. 90 'Set a valid <code>$kohana_system</code> in <tt>'.KOHANA.'</tt> and refresh the page.' 91 ); 99 // Check SYSPATH 100 if ( ! (is_dir(SYSPATH) AND is_file(SYSPATH.'bootstrap'.EXT))) 101 { 102 die 103 ( 104 '<div style="width:80%;margin:50px auto;text-align:center;">'. 105 '<h3>System Directory Not Found</h3>'. 106 '<p>The <code>$kohana_system</code> directory does not exist.</p>'. 107 '<p>Set <code>$kohana_system</code> in <tt>'.KOHANA.'</tt> to a valid directory and refresh the page.</p>'. 108 '</div>' 109 ); 110 } 111 } 92 112 93 require SYSPATH.'core/Bootstrap'.EXT; 113 // Initialize Kohana 114 require SYSPATH.'bootstrap'.EXT;
