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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...