#3 root_path could be autoconfigured

open
nobody
None
5
2008-11-03
2008-11-03
Anonymous
No

Dear all.

As long as config.php is included from a file in the
top-level directory (it is. from include.php). root_path
could be guessed as follows (windows-safe):

$config['root_path'] = dirname(__FILE__).'/';
if (DIRECTORY_SEPARATOR!='/')
# for windows
$config['root_path'] = str_replace('\\', '/', dirname(__FILE__)).'/';

Take care.

Arne <zonk@matfyz.cz>

Discussion