In harbour winforms applications we seem to store specific information for our apps in the .ini file. On the web it seems it is stored in web.config. Does mod_harbour have a way to read and write from a web.config file as harbour does with .ini's?
Thanks,
App.Ini vs Web.Config
-
- Posts: 254
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
App.Ini vs Web.Config
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
Re: App.Ini vs Web.Config
Hi,
I think you can write/read yiur file config like a usual file. And for example you can use memowrit/memoread for it
C.
I think you can write/read yiur file config like a usual file. And for example you can use memowrit/memoread for it
C.
Salutacions, saludos, regards
"...programar es fácil, hacer programas es difícil..."
https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
"...programar es fácil, hacer programas es difícil..."
https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
-
- Posts: 254
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: App.Ini vs Web.Config
Yes, thank you, good point. I was looking for a class that may make it easier like the oIni class that allows us to read and write to INI files.
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
Re: App.Ini vs Web.Config
Byron,
You can do
You can do
Code: Select all
function main()
local cIni := hb_GetEnv( "PRGPATH" ) + '/myini.txt'
local hIni := {=>}
hIni[ 'name' ] := 'Charly'
hIni[ 'last' ] := time()
hIni[ 'age' ] := 52
// Save your ini
memowrit( cIni, hb_jsonencode( hIni ) )
// Read your ini
h := hb_jsondecode( memoread( cIni ))
? h[ 'name' ]
? h[ 'last' ]
? h[ 'age' ]
retu nil
Salutacions, saludos, regards
"...programar es fácil, hacer programas es difícil..."
https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
"...programar es fácil, hacer programas es difícil..."
https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
-
- Posts: 254
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: App.Ini vs Web.Config
Below is a minimal web.config example from Microsoft Support.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
</system.web>
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
</system.web>
</configuration>
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services