firts commit
This commit is contained in:
22
config/functions_init.php
Normal file
22
config/functions_init.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
function error_env($option){
|
||||
global $env;
|
||||
if (empty($env)){
|
||||
$result="<p class='err_env_result'><span>ERROR:</span> Variable '<u>\$env</u>' is empty!</p>";
|
||||
$help="<p class='err_env_help'>Please insert the correct value in the file 'config/init.php' or leave it to 'generic'</p>";
|
||||
}else{
|
||||
$result="<p class='err_env_result'><span>ERROR:</span> The environment '<u>{$env}</u>' not exists!</p>";
|
||||
$help="<p class='err_env_help'>Please insert the correct value in the file 'config/init.php or leave it to 'generic'</p>";
|
||||
}
|
||||
|
||||
if($option == "result"){
|
||||
echo $result;
|
||||
}elseif($option == "help"){
|
||||
echo $help;
|
||||
}else{
|
||||
echo "ERROR: Wrong attribute in declared in the function!";
|
||||
die;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user