Changeset 458 for trunk/index.php

Show
Ignore:
Timestamp:
09/01/2007 12:22:23 PM (15 months ago)
Author:
Shadowhand
Message:

Removing usage of DIRECTORY_SEPARATOR, it causes some odd issues. Instead, we are normalizing all paths to use forward slashes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r450 r458  
    3333*/ 
    3434// Absolute path names for include purposes 
    35 define('APPPATH', realpath($kohana_application).DIRECTORY_SEPARATOR); unset($kohana_application); 
    36 define('SYSPATH', realpath($kohana_system).DIRECTORY_SEPARATOR); unset($kohana_system); 
     35define('APPPATH', str_replace('\\', '/', realpath($kohana_application)).'/'); unset($kohana_application); 
     36define('SYSPATH', str_replace('\\', '/', realpath($kohana_system)).'/'); unset($kohana_system); 
    3737// Information about the front controller 
    3838define('KOHANA',  pathinfo(__FILE__, PATHINFO_BASENAME)); 
    39 define('DOCROOT', pathinfo(__FILE__, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR); 
     39define('DOCROOT', pathinfo(__FILE__, PATHINFO_DIRNAME).'/'); 
    4040define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); 
    4141// Validate APPPATH 
    42 (is_dir(APPPATH) AND is_dir(APPPATH.DIRECTORY_SEPARATOR.'config')) or die 
     42(is_dir(APPPATH) AND is_dir(APPPATH.'/config')) or die 
    4343( 
    4444        'Your <code>$application_path</code> does not exist. '. 
     
    4646); 
    4747// Validate SYSPATH 
    48 (is_dir(SYSPATH) AND file_exists(SYSPATH.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'Bootstrap'.EXT)) or die 
     48(is_dir(SYSPATH) AND file_exists(SYSPATH.'/core/'.'Bootstrap'.EXT)) or die 
    4949( 
    5050        'Your <code>$kohana_system</code> does not exist. '. 
     
    5252); 
    5353// Buckle those bootstraps! 
    54 require_once SYSPATH.'core'.DIRECTORY_SEPARATOR.'Bootstrap'.EXT; 
     54require_once SYSPATH.'core/Bootstrap'.EXT;