Login   Register  
PHP Classes
elePHPant
Icontem

File: valid_config.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Keyvan Minoukadeh  >  Config Manager  >  valid_config.txt  >  Download  
File: valid_config.txt
Role: ???
Content type: text/plain
Description: example of a valid config file
Class: Config Manager
Sorry, no longer supported
Author: By
Last change:
Date: 2002-03-29 17:00
Size: 968 bytes
 

Contents

Class file image Download
# int: no quotes
testvar		= 10
# string: requires quotes
teststring	= 'hello'
# string: unless using type prefix
str_teststring2	= hello

[A Section]

# A comment
testvar2	= 'hello'

# type cast
int_testcast	= '1324'


[Special characters]

# incorrect method (single quotes)
testspecial	= 'new line: \n carriage return: \r tab: \t'

# correct method (double quotes)
testspecial2	= "new line: \n carriage return: \r tab: \t"

# escaping special chars when using double quotes
testspecial3	= "new line: \\n carriage return: \\r tab: \\t"

[Array]

# when a variable name is repeated within a section
# config reader will automatically recognise
# it as an array
testarray	= 10
testarray	= 20
testarray	= 30

[Assoc array]

testassoc.hello	= 10
testassoc	= 20
testassoc.bye	= 30


[Type Cast]

# integer
int_testint	= 10.12

# double
dbl_testint	= 10.12

# string
str_testint	= 10.12

# boolean
bool_testint	= 10.12