webmcp
view framework/env/request/get_absolute_baseurl.lua @ 31:1cd9e69b85cb
add execute.load_chunk(args)
load_chunk loads the content of a lua file and returns the code.
It can construct the path name easily so you can put helper code in
seperate files for DRYness.
load_chunk loads the content of a lua file and returns the code.
It can construct the path name easily so you can put helper code in
seperate files for DRYness.
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Tue Oct 05 02:34:04 2010 +0200 (2010-10-05) |
parents | 944642a3e488 |
children | 2169a62e12f5 |
line source
1 --[[--
2 baseurl =
3 request.get_absolute_baseurl()
5 This function returns the absolute base URL of the application, as set by request.set_absolute_baseurl(...).
7 --]]--
9 function request.get_absolute_baseurl()
10 if request._absolute_baseurl then
11 return request._absolute_baseurl
12 else
13 error("Absolute base URL is unknown. It should be set in the configuration by calling request.set_absolute_baseurl(...).")
14 end
15 end