Hi,
On Thu, 2012-08-02 at 17:54 +0200, Oliver Rath wrote:
> in my tntnet-prog i would like to have then a possibility for reading
> this in a way like
>
> readconfigfile("/etc/mydefs.conf")
> myvar = getconfigvar("IBLOCK_PREFIX")
you can use cxxtools/inifile.h for that purpose:
cxxtools::IniFile config("/etc/mydefs.conf");
myvar = config.getValue("mysection", "IBLOCK_PREFIX"");
An other way is cxxtools serialization (json||xml atm), afair there
_should_ be some examples in the wiki, for now, you can loog in the svn
version of tntnet.
In any case, you will need to put it in a singleton or a similar
construct, thus your config got read once and not on every request.
Regards,
Julian
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general