PHP Classes

File: example_config_file.txt

Recommend this page to a friend!
  Classes of Marko Tapio Manninen   Config Tool   example_config_file.txt   Download  
File: example_config_file.txt
Role: Configuration script
Content type: text/plain
Description: Example configuration file
Class: Config Tool
Read and write configuration text files
Author: By
Last change:
Date: 20 years ago
Size: 2,073 bytes
 

Contents

Class file image Download
## Initial configuration description
## This is an example, how to use config calss and config text files together
## you can make comment lines anywhere, but they should be on separate lines
## not like: name = value ## my comment
// comment lines can start with any special character
;; only lines, that start with alphabeth, are interpreted as name value pair
;; so first key value pair will be typical hello world...
hello1 = Greetings!
## To use configtools automatic key type conversion (AKTC), you have to start key names
## with one of the following prefixes: b_, s_, i_ or a_.
## That way they will be interpreted as b->boolean, s->string, i->integer and a->array
##
## Some special notes must be understood, before using AKTC:
##
## Boolean values must have one of the 8 values: b_my_boolean = true,false,yes,no,1,0,on,off
## Array value must be comma separated: a_my_array = value1,value2,value3,value4,value5,value6,value7
## String values must started and ended with '-marks: s_my_string = 'Here comes long string'
## Exceptions are one-word-strings, they can be without '-marks: s_my_word = Worldcup
## If there is a string, that contains spaces, but no leadinf and trailing ', all the
## words will be concated to each other!
## Integers cannot contain alphabets: i_my_integer = 13.3
##
## Example names and values:
##
b_my_boolean1 = true
b_my_boolean2 = no
b_my_boolean3 = not ok...
s_my_string1 = 'My long string comes from here.'
s_my_string2 = This is not going to work properly!
s_my_word = But_this_is_going_to_work!
hello2 = 'Works well without prefix. This value is interpreted as a string.'
a_my_array1 = Finland,England,Thailand,NoMansLand
a_my_array2 = Finland, England, Thailand, ,NoMansLand
i_my_integer1 = 1024
i_my_integer2 = 1024.51
i_my_integer3 = 1024,51
##
## ConfigTool removes empty spaces automatic, so you can indent lines as you can see above.
## Prefer spaces (no tabs) if you want to keep text file visually nice.
## End of initial configuration description