Add config.ini #5
This commit is contained in:
parent
2fa3bc054a
commit
dc7b04bb9c
11
config.ini
Normal file
11
config.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[html]
|
||||
css = index.css
|
||||
favicon = favicon.svg
|
||||
|
||||
[upload]
|
||||
upload_dir = uploads2/
|
||||
max_size = 100
|
||||
|
||||
[credentials]
|
||||
key_file = passwords.txt
|
||||
temp_key_file = temporary_passwords.txt
|
27
config.php
27
config.php
|
@ -1,8 +1,23 @@
|
|||
<?php
|
||||
$Stylesheet = "index.css"; // path to stylesheet
|
||||
$Icon = "favicon.svg"; // path to favicon
|
||||
$uploadDir = "uploads/"; // directory to store uploads in
|
||||
$keyFile = "passwords.txt"; // text file containing primary passwords
|
||||
$tempKeyFile = "temporary_passwords.txt"; // text file containing temporary passwords
|
||||
$maxFileSize = "100"; // in megabytes
|
||||
$Stylesheet = "index.css";
|
||||
$Icon = "favicon.svg";
|
||||
$uploadDir = "uploads/";
|
||||
$keyFile = "passwords.txt";
|
||||
$tempKeyFile = "temporary_passwords.txt";
|
||||
$maxFileSize = "100";
|
||||
|
||||
define('CONFIG_FILE', 'config.ini');
|
||||
|
||||
if (!file_exists(CONFIG_FILE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* load config file */
|
||||
$configEntries = parse_ini_file(CONFIG_FILE);
|
||||
$Stylesheet = $configEntries['css'];
|
||||
$Icon = $configEntries['favicon'];
|
||||
$uploadDir = $configEntries['upload_dir'];
|
||||
$keyFile = $configEntries['key_file'];
|
||||
$tempKeyFile = $configEntries['temp_key_file'];
|
||||
$maxFileSize = $configEntries['max_size'];
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue