Jump to content

Load parameters


alextro

Recommended Posts

Hello! is possible to load UniServerModule parameters like: port, title... from a file?

 

Like all the properties of all Delphi components.

I use something like this

 

procedure TUniServerModule.FirstInit;

var

file_ini: tinifile;

begin

InitServerModule(Self);

 

file_ini := tinifile.create(UniServerModule.filesfolderpath + 'go.cfg');

 

port := file_ini.readinteger('goweb', 'porta_go_web', 8077);

extroot := file_ini.readstring('goweb', 'cartella_extjs', '[ext]\');

 

file_ini.free;

end;

 

I can't change the standard value if I use the standalone server.

Link to comment
Share on other sites

Thanks, but is possible to list files in a specific folder using mask like 'some*.txt', TFilelistbox doesn't work!

Use FindFirst, FindNext and FindClose commands for this. Please take a look to the URL (there is a simple example of usage of these commands). To store filenames, use a simple TStringList.

Regards,

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...