dbserverdomain()

The dbserverdomain( function returns the server domain for the database.


Parameters

No parameters.


Description

This function returns the server domain for the database. If this is running on a server, it always returns the servers domain. If running on a client (presumably for testing) it will return the ip address of the server this client is hosted on. This code takes a variable named imageurl and checks if it contains a domain name. If it doesn’t, the domain name of the current server is added.

if imageurl beginswith "/"
    imageurl = dbserverdomain()+imageurl
endif

Suppose your server domain is http://www.mysite.com, and you set imageurl to /images/face.jpg. After you run the code above imageurl will be changed to:

http://www.mysite.com/images/face.jpg

See Also


History

VersionStatusNotes
10.2No ChangeCarried over from Panorama 6.0.