コード例 #1
0
        // append trailing /
    }
    if ($path != "/" && !preg_match("/^\\/[^\\/]/", $path)) {
        //check for leading /
        $path = "/" . $path;
        // prepend leading /
    }
    //		if (strpos($path,HEURIST_DOCUMENT_ROOT) === false) {
    //			$path = HEURIST_DOCUMENT_ROOT.$path;
    //		}
    if (!testDirWriteableAndDefine('HEURIST_HTML_PUBPATH', $path, false, true)) {
        error_log("HMTL directory {$path} is not a writable directory, trying default");
    }
}
if (!defined('HEURIST_HTML_PUBPATH') && defined('HEURIST_UPLOAD_DIR')) {
    testDirWriteableAndDefine('HEURIST_HTML_PUBPATH', HEURIST_UPLOAD_DIR . "html-output/", false, true);
}
if (!defined('HEURIST_HTML_PUBPATH')) {
    error_log('No upload HTML directory defined that is a writable directory');
}
// set up email defines
if ($bugEmail) {
    define('HEURIST_MAIL_TO_BUG', $bugEmail);
    //mailto string for heurist installation issues
} else {
    define('HEURIST_MAIL_TO_BUG', '*****@*****.**');
    //mailto string for heurist installation issues
}
if ($infoEmail) {
    define('HEURIST_MAIL_TO_INFO', $infoEmail);
    //mailto string for heurist installation issues
コード例 #2
0
ファイル: initialise.php プロジェクト: HeuristNetwork/heurist
    $path = getRelativeFolder($path);
    testDirWriteableAndDefine('HEURIST_HML_DIR', $documentRoot . $path, "HML output directory");
}
if (!defined('HEURIST_HML_DIR')) {
    testDirWriteableAndDefine('HEURIST_HML_DIR', HEURIST_FILESTORE_DIR . 'hml-output/', "HML output directory");
    define('HEURIST_HML_URL', HEURIST_FILESTORE_URL . 'hml-output/');
}
allowWebAccessForForlder(HEURIST_HML_DIR);
$path = @$sysValues['sys_htmlOutputDirectory'];
if ($path) {
    $path = getRelativeFolder($path);
    testDirWriteableAndDefine('HEURIST_HTML_DIR', $documentRoot . $path, "HTML output directory");
    define('HEURIST_HTML_URL', HEURIST_SERVER_URL . $path);
}
if (!defined('HEURIST_HTML_URL')) {
    testDirWriteableAndDefine('HEURIST_HTML_DIR', HEURIST_FILESTORE_DIR . 'html-output/', "HTML output directory");
    define('HEURIST_HTML_URL', HEURIST_FILESTORE_URL . 'html-output/');
}
allowWebAccessForForlder(HEURIST_HTML_URL);
// FAIMS MODULES
if (isset($defaultFaimsModulesPath)) {
    if (file_exists($defaultFaimsModulesPath) && is_dir($defaultFaimsModulesPath)) {
        define('HEURIST_FAIMS_DIR', $defaultFaimsModulesPath);
    }
}
/* should be explicitely defined
if (!defined('HEURIST_FAIMS_DIR')) {
$path = HEURIST_FILESTORE_DIR . 'faims';
if(file_exists($path) && is_dir($path)){
define('HEURIST_FAIMS_DIR', $path);
}