use JSON configs, which is faster&simpler.
Config file structure: PROPERTYSTRING1=str
PROPERTYSTRING2=str2
Enjoy 🎉🎉🎉🎉🎉
Config file structure: PROPERTYSTRING1=str
PROPERTYSTRING2=str2
PHP Code
<?php
public static void loadConfig() {
Properties prop = new Properties();
InputStream input = null;
try {
input = new FileInputStream("config.txt");
prop.load(input);
String s = prop.getProperty("PROPERTY_STRING_1");
} catch (IOException ex) {
ex.printStackTrace();
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Enjoy 🎉🎉🎉🎉🎉

