Exemple #1
0
// Get current microtime to calculate execution time
$time_start = microtime(true);
// Include the configuration file parser.
include_once 'cfg/parse.php';
// Include the functions needed to run Phavison.
include_once 'phavison.dependants.php';
// Define key variables for the phavison application.
$return_data = array();
$error_code = 0;
$error_message = "";
$call_data = null;
$para = null;
$function = null;
// Define and populate our phavison settings.
$ini = new INI("cfg/config.ini");
$settings_phavison_enabled = $ini->getSetting('SETTINGS', 'ENABLE');
$settings_phavison_secure = $ini->getSetting('SETTINGS', 'ENABLE_SECURE_MODE');
$settings_phavison_get_enabled = $ini->getSetting('SETTINGS', 'ENABLE_GET');
$settings_php_dir = $ini->getSetting('FILES', 'INCLUDE_DIR');
$settings_non_include_dir = $ini->getSetting('FILES', 'NON_INCLUDE_DIR');
$settings_dir_perm = $ini->getSetting('FILES', 'DIR_PERM');
// Check if the user has enabled this Application to run.
if (!$settings_phavison_enabled) {
    $error_message = "Your configuration settings are not allowing phavison to run";
    $error_code = "I-Err_1";
    $call_data = null;
}
/* Check if the Phavison's include and non include PHP directories exists, if not, make the directories.
	-------- START FOLDER PROCESSING -------- */
if (!file_exists($settings_php_dir)) {
    if (!mkdir($settings_php_dir, $settings_php_dir_perm, true)) {