CGI_CfgSetOption

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > CGI >

CGI_CfgSetOption

 

Description

 

Allows to change one specified configuration options.

 

Syntax

 

CGI_CfgSetOption(nOption As NUMBER, xValue As ?) As ?

 

Returns

 

Return a string or numeric value depending on nOption type.

   The new current value of nOption.

 

Parameters

 

nOption AS NUMBER

The option to query for value, it can be one of following values:

%CGI_ACCEPT_FILE_UPLOAD

If non zero CGI can accept file upload, if zero file upload are not handled.

%CGI_AUTO_ADD_SPECIAL_CHARS_PREFIX

 If non zero CGI automatically adds prefix to each special characters,

 if zero special characters are not prefixed.

%CGI_AUTO_CREATE_VARS

If non zero CGI automatically creates GET and POST variables as script

variables, if zero variables are not created.

%CGI_BUFFERIZE_OUTPUT

If non zero CGI bufferize output write to it at once, if zero output is written immediately.

%CGI_FILE_UPLOAD_BASEPATH

Specify the path where put the downloaded files, must be backslash ('\') ended.

%CGI_FORCE_SESSION_VALIDATION

Specify if each request must validated before to process it.

If a request could not be successfully validated it cannot be processed.

%CGI_MAX_BYTE_FROM_STD_IN

Specify how many bytes can be read from standard input for each request.

%CGI_SESSION_FILE_BASEPATH

Specify the path where put the session files, must be backslash ('\') ended.

%CGI_SPECIAL_CHARS_PREFIX

Specify the prefix to use for handle special chars, if %CGI_AUTO_ADD_SPECIAL_CHARS_PREFIX is zero this option is ignored.

%CGI_TEMPORARY_UPLOAD_PATH

Specify the path where temporary put the downloaded files, must be backslash ('\') ended. This value cannot be changed at runtime.

%CGI_UPLOAD_CAN_OVERWRITE

If non zero upload can overwrites existing file, if zero upload cannot overwrites existing files.

%CGI_WRITE_LOG_FILE

If non zero CGI write more useful information to the log file thinBasicCGI.log, if zero log file are not written.

%CGI_WRITE_VARS_INTO_LOG_FILE

If non zero CGI write the variables name and values into the log file, if zero vars are not written to log file. If %CGI_WRITE_LOG_FILE option is zero this option is ignored.

 

 

Remarks

 

Options are loaded from a thinBasicCGI.config configuration file if found, otherwise the system starts with internals default value.

Alternatively you can override the previous settings by loading another configuration file or changing some options at run time.

 

Restrictions

 

 

See also

 

CGI_CfgGetOption, CGI_LoadConfigFile, thinBasicCGI.config

 

Examples

 

If CGI_CfgSetOption(%CGI_ACCEPT_FILE_UPLOAD, %False) = 0

Echo("File upload is: Disabled ")

End If