Move common.php outside of the DocumentRoot

This commit is contained in:
Ludovic Poujol 2023-02-15 11:35:21 +01:00
parent ad68e298dd
commit 77f5076c88
2 changed files with 20 additions and 2 deletions

View File

@ -30,7 +30,7 @@ header('Content-Type: text/html; charset=utf-8');
/**
* Requires
*/
require_once EVOADMIN_BASE . 'common.php';
require_once EVOADMIN_BASE . '../inc/common.php';
$uri = $_SERVER['REQUEST_URI'];

View File

@ -1,5 +1,4 @@
<?php
/**
* file included in every PHP file
*
@ -97,6 +96,25 @@ function is_multiphp() {
return array_key_exists('php_versions', $conf) && count($conf['php_versions']) > 1;
}
/**
* Webadd
*
* @return boolean - True when it's a multi PHP system
*/
function run_webadd_cmd($command) {
global $conf;
$cmd = 'web-add.sh '. $command;
$data_output = null;
$exec_return = null;
sudoexec($cmd, $data_output, $exec_return);
return $data_output;
}
/**
* Includes
*/