Revize 1618
Přidáno uživatelem Ondřej Fibich před více než 12 roky(ů)
freenetis/branches/testing/application/helpers/server.php | ||
---|---|---|
/**
|
||
* Returns base directory of FreenetIS
|
||
*
|
||
* @author David Raška
|
||
* This function is based on current path of this file, please do not
|
||
* relocate this file!!
|
||
*
|
||
* @author Ondřej Fibich
|
||
* @return string
|
||
*/
|
||
public static function base_dir()
|
||
{
|
||
$path_parts = explode('/', ltrim(@$_SERVER['SCRIPT_NAME'], '/'));
|
||
|
||
$folder = '';
|
||
|
||
if (count($path_parts) > 0)
|
||
{
|
||
$folder = '/'.$path_parts[0];
|
||
}
|
||
|
||
return @$_SERVER['DOCUMENT_ROOT'] . $folder;
|
||
return dirname(dirname(dirname(__FILE__)));
|
||
}
|
||
|
||
}
|
Také k dispozici: Unified diff
Opravy:
- oprava funkce vracejici cestu k hlavnimu adresari freenetis (ne relativni) stara funkce zpusobovala problemy pri upgradu