MastodonHelp/web/site/mustard/include/getiniarr.php

18 lines
568 B
PHP
Raw Normal View History

2020-05-01 06:51:22 +02:00
<?php
require(__DIR__.'/ckkeys.php');
function getiniarr() {
2020-10-18 06:53:27 +02:00
$inifp='../../conf/mustard.ini';
2020-05-01 06:51:22 +02:00
$iniarr=parse_ini_file($inifp)
or muoribene('Couldnt open configuration file «'.$inifp.'».',false);
2020-05-10 15:06:06 +02:00
$missing=ckkeys(array('db_host','db_port','db_socket','db_name','db_admin_name','db_admin_password','ref_name','ref_email','site_domain','mail_test_to'),$iniarr);
2020-05-01 06:51:22 +02:00
if (count($missing)>0)
muoribene('Configuration file «'.$inifp.'» is missing some required fields: “'.implode('”, “',$missing).'”.',false);
return($iniarr);
}
$iniarr=getiniarr();
?>