PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → get the ??? of the ???_WEB directory at runtime (server)
get the ??? of the ???_WEB directory at runtime (server)
Iniciado por meikl, 31,ago. 2016 13:21 - 3 respuestas
Miembro registrado
122 mensajes
Publicado el 31,agosto 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 :)
Publicado el 09,septiembre 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
Miembro registrado
122 mensajes
Publicado el 09,septiembre 2016 - 13:14
Thanks Michael,

will try

regrads

meikl :)
Publicado el 09,septiembre 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