Changeset 2170 for trunk/index.php

Show
Ignore:
Timestamp:
02/25/2008 08:20:01 PM (9 months ago)
Author:
Shadowhand
Message:

Fixing a bug when index.php is symlinked to a different directory.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r2005 r2170  
    7070// Define the front controller name and docroot 
    7171define('DOCROOT', getcwd().DIRECTORY_SEPARATOR); 
    72 define('KOHANA',  substr(__FILE__, strlen(DOCROOT))); 
     72define('KOHANA',  basename(__FILE__)); 
     73 
     74// If the front controller is a symlink, change to the real docroot 
     75is_link(KOHANA) and chdir(dirname(realpath(__FILE__))); 
    7376 
    7477// Define application and system paths