PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → get the ??? of the ???_WEB directory at runtime (server)
get the ??? of the ???_WEB directory at runtime (server)
Débuté par meikl, 31 aoû. 2016 13:21 - 3 réponses
Membre enregistré
118 messages
Posté le 31 août 2016 - 13:21
Hi members,

at the deployment you can change the "site" name in the field "Deployment name of the Site".
How to get the name at Runtime at serverCode?

thanks

meikl :)
Posté le 09 septembre 2016 - 10:56
Our team was unable to find a function that specifically supplied the site name so instead we opted to use the fCurrentDir() command. This will return where your website currently exists on the server during runtime. If you always have a set of predefined names for your site then you can use a switch statement to do a comparison to determine what your current site name is. For example:
sMyDir is string = fCurrentDir()
SWITCH True
CASE Contains(sMyDir,"SiteA",IgnoreCase)
INFO("Site A")
CASE Contains(sMyDir,"SiteB",IgnoreCase)
INFO("Site B")
END
Membre enregistré
118 messages
Posté le 09 septembre 2016 - 13:14
Thanks Michael,

will try

regrads

meikl :)
Posté le 09 septembre 2016 - 13:45
Hi

you can get that information from the curent URL.

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 9/9/2016 à 2:56 AM, Michael George a écrit :
Our team was unable to find a function that specifically supplied the
site name so instead we opted to use the fCurrentDir() command. This
will return where your website currently exists on the server during
runtime. If you always have a set of predefined names for your site
then you can use a switch statement to do a comparison to determine what
your current site name is. For example:
sMyDir is string = fCurrentDir()
SWITCH True
CASE Contains(sMyDir,"SiteA",IgnoreCase)
INFO("Site A")
CASE Contains(sMyDir,"SiteB",IgnoreCase)
INFO("Site B")
END