Location: PHPKode > projects > Wexplorer > weXplorer/config.inc.php
<?php
/*
 * NOTHING TO EDIT HERE
 * CONFIGURATION IS DONE IN WEXPLORER.INI
 * THIS IS JUST THE INI FILE PARSER
 */

function startsWith($string, $prefix) {
	return (preg_match("¤^{$prefix}¤i", $string));
}
require_once("compat/file_get_contents.php");
require_once("compat/file_put_contents.php");

$ini_array = parse_ini_file("weXplorer.ini", true);

define('ROOT_DIR',$ini_array['general']['ROOT_DIR']);
define('USE_CANONICAL_URL',$ini_array['general']['USE_CANONICAL_URL']);
define('TRANSPARENT_URL_FRAGMENT',$ini_array['general']['TRANSPARENT_URL_FRAGMENT']);
if(USE_CANONICAL_URL)
	define('ROOT_URL',$ini_array['general']['ROOT_URL']);
else 
	define('ROOT_URL',TRANSPARENT_URL_FRAGMENT);
define('ACCESS_MANAGER', $ini_array['authentication']['ACCESS_MANAGER']);
define('MESSAGE_FILE', $ini_array['general']['MESSAGE_FILE']);
define('DISPATCHER', $ini_array['general']['DISPATCHER']);
define('IGNORE_FILES', $ini_array['general']['IGNORE_FILES']);
define('LOGGER', $ini_array['log']['logger']);
define('LOGFILE', $ini_array['log']['file']);
define('LOGDATE', $ini_array['log']['date']);
define('LOGFORMAT', $ini_array['log']['format']);
define('ADMIN_PASSWD', $ini_array['general']['ADMIN_PASSWD']);
define('INLINE_FILE_EXTENSIONS', $ini_array['general']['INLINE_FILE_EXTENSIONS']);
define('AUTH_REQUIRED_ON_URLS', $ini_array['authentication']['AUTH_REQUIRED_ON_URLS']);
define('PUBLIC_FILE_EXTENSIONS', $ini_array['authentication']['PUBLIC_FILE_EXTENSIONS']);
define('PASSWD_FILE', $ini_array['authentication']['PASSWD_FILE']);
define('USERNAME_MUST_MATCH', $ini_array['authentication']['USERNAME_MUST_MATCH']);
$pathMap = array ();
$mappings = split(',', $ini_array['general']['FOLDERS']);
foreach ($mappings as $mapping) {
	$mapping = split('->', $mapping);
	if ($mapping[0][0] == "*")
		$mapping[0] = substr($mapping[0], 1);
	$pathMap[$mapping[0]] = $mapping[1];
}

/*
 * maps URL paths to file system paths
 */
function expandPath($path) {
	global $pathMap;
	foreach ($pathMap as $URLprefix => $FSprefix) {
		//echo '¤^[\.\/]*'.$URLprefix.'¤'.",$FSprefix,$path<br>";
		if (startsWith($path, '^[\.\/]*'.$URLprefix)) {
			return realpath(preg_replace('¤^[\.\/]*'.$URLprefix.'¤', $FSprefix, $path));
		}
	}
	return realpath($path);
}
?>
Return current item: Wexplorer