You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
618 B
24 lines
618 B
<?php
|
|
//define('ROOT_PATH', ROOT_PATH.'ag
|
|
|
|
// okay and now define the url ;)
|
|
|
|
if(!defined('ROOT_PATH')) {
|
|
$actual_path = $_SERVER['SCRIPT_FILENAME'];
|
|
$url_path = $_SERVER['SCRIPT_NAME' ];
|
|
//s echo $actual_path .'<br>';
|
|
|
|
// okay this is the script that has included us :) -> lets search for the include/config/ directory
|
|
while(strlen($actual_path) > 0) {
|
|
$actual_path = substr($actual_path,0,strrpos($actual_path,'/'));
|
|
$url_path = substr($url_path,0,strrpos($url_path,'/'));
|
|
if(is_dir($actual_path . '/include/config')) {
|
|
define('ROOT_PATH', $actual_path);
|
|
define('ROOT_URL', $url_path);
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|
|
|