Skip to content
LaCodon edited this page Mar 1, 2016 · 4 revisions

Never ever grant the public access to this file!

The config.ini file is the main config file of any Famework project. It's possible to freely choose a save path for this file but keep in mind, to also adapt the path in the line where it says $famework = new Famework(new Famework_Config('config.ini'), new Famework_Config('routes.ini')); (in /index.php).

Contents


Default config.ini content:

; required params
[famework]
public_root = HTTP_ROOT
view_path = VIEW_PATH

; optional params
use_session = false

[database]
db_dsn = "mysql:dbname=test;host=127.0.0.1"
db_user = dbUser
db_pass = dbUserPwd

Famework section

famework.public_root

required
This sets the HTTP_ROOT path. Normaly you can leave this as it is. Just make sure the name HTTP_ROOT matches with the corresponding constant in /index.php if you use this constant. Famework just needs the config param, not the constant.

famework.view_path

required
Sets the folder path of your view folder. Again, make sure this is named equally to your PHP constant if you use one. Famework just needs the config param, not the constant.

famework.use_session

Set this to true if you always want Famework_Session::start(); to get called on a request. This is not necessary in order to work with sessions. It's also possible to call Famework_Session::start(); manuallay in a Controller.

Database section

database.db_dsn

See PHP documentation for more information on this string.

database.db_user

The username which should be used to access the database.

database.db_pass

The password which should be used to log into the database.