CONFIG

NAME

config - Function config

SYNOPSIS

a = config();

DESCRIPTION

This variable contains extenso configuration:

Starting at version 5.54 config also return the following information:

Starting at version 5.67

EXAMPLE

#
# Project name
# 

Project : "v5"                                             # Name of project
WebsiteRoot : "/usr/local/website/v5"                      # Root of project ; No ending slash
Locale : "fr_CA.utf8"                                      # Locale used in program
Postmax : "64000"                                          # Maximum number of bytes for a post

#
# Database connection
#

Database default {
	Host : "localhost"                                     # Server name
	Name : "v5"
	User : "v5"
	Password : "v5"
	charset : "utf8"
}

# Timeout for a request
Timeout : "5"

#
# List of modules
#

Module curl {
	Library : "/usr/local/lib/libsncurl.so"
	Init : "sncurl_init"
}

Module exif {
	Library : "/usr/local/lib/libsnexif.so"
	Init : "snexif_init"
}

Module geoip {
	Library : "/usr/local/lib/libsngeoip.so"
	Init : "sngeoip_init"
}

Module geoip2 {
	Library : "/usr/local/lib/libsngeoip2.so"
	Init : "sngeoip2_init"
}

Module gd {
	Library : "/usr/local/lib/libsngd.so"
	Init : "sngd_init"
}

Module hash {
	Library : "/usr/local/lib/libsndbhash.so"
	Init : "sndbhash_init"
}
Module xml {
	Library : "/usr/local/lib/libsnxml.so"
	Init : "snxml_init"
}

Module exemple {
	Library : "/usr/local/lib/libsnexemple.so"
	Init : "snexemple_init"
	ChildInit : "snexemple_child_init"
	vara : "valuea"
	varb : "valueb"
}

#
# Preload these functions
#

Preload : "/usr/local/website/v5/extenso/functions/preload.snc"
#Preload : ""

#
# Default error file
#

Error : "/usr/local/website/v5/html/tests/error.snc"

#
# Index file
# 

Index : ".snc,.sn,index.sn"

#
# Log directory if needed
# 

#Log : "/extenso_logs/"
#

#
# variable json style
#
variable { 
	"x" : 5,
	"y" : [1,2,3]
}
# Do no esc cgidata
esc_cgidata : "false"

SEE ALSO

variables

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

1.1 2016-04-01 laplante@sednove.com support for version and module starting at version 5.54

1.2 2016-07-27 laplante@sednove.com Add support for variable

1.3 2017-11-17 laplante@sednove.com source is suppoted since version 5.90