-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration
In the most of cases you will not need to modify more than one or two configuration variables, however here is the description of all configuration variables:
$config['session_name'] = 'session_name';
Your project's session name, each project need a unique session name to avoid overwrite session variables between different projects.
$config['time_zone'] = 'America/Mexico_City';
The time zone configuration to use in your project, this is needed if you use PHP functions related to date or time, to know more about time zone configurations please read PHP: List of Supported Timezones
$config['lc_all'] = null;
Value used automatically with PHP's function set_locale(), if this value is not null
then all the following lc_xyz
configuration variables will be ignored.
$config['lc_collate'] = '0';
$config['lc_ctype'] = '0';
$config['lc_ctype'] = '0';
$config['lc_monetary'] = '0';
$config['lc_numeric'] = '0';
$config['lc_time'] = array('es_MX.UTF8', 'esm');
All lc_xyz
variables have the same behavior of LC_XYZ
PHP's constants, and are used with set_locale() automatically only if $config['lc_all']
is not null
.
If you dont know what this is then probably you'll don't need them.
$config['error_magic_quotes_gpc'] = true;
If this value is true
then the script's execution will stops if magic quotes GPC is activated, showing an error message.
You should never use magic quotes GPC.
$config['cookie_life_time'] = 1296000;
Cookie's lifetime in seconds, defaults to 15 days.
To learn how to send cookies with QuarkPHP read the Sessions & Cookies section.
$config['cookie_domain'] = null;
The domain name where your cookies will be available, this is usefull when you create a multilingual website and the subdomain is the language prefix and you want share your cookie data across subdomains.
*To lear how to build multilingual websites with QuarkPHP read the Multilingual-websites section.
$config['debug'] = true;
When debug is true, all error messages will be displayed, you should set this to false in production environments.
$config['langs'] = array();
The language prefixes used in multilingual websites.
*To lear how to build multilingual websites with QuarkPHP read the Multilingual-websites section.
$config['lang_on_subdomain'] = false;
Defines if the language prefix will be on the subdomain of URLs, or will be as a part of the URL path, to know more about this please read URL Requests documentation.
$config['error_reporting'] = E_ALL ^ E_DEPRECATED;
Flags for error reporting, this value is used automatically with PHP's error_reporting() function.
$config['auto_includes'] = array();
List of PHP scripts that are included before the controller is instantiated, these scripts should be in the application/includes/
path.
$config['class_paths'] = array();
List of paths where you put your scripts for class definitions, this is used automatically with PHP's __autoload() function, these paths are relative to your proyect root.
QuarkPHP supports multiple databases connections.
By default there is a default connection named default ($db_config['default']
) as you see.
If you need to connect to more than one database in your project you'll need to define more $db_config['connection_name']
variables with your database connection settings, where connection_name is the name you want for that specific connection.
$db_config['default']['host'] = 'localhost';
Database host, in this case for default connection.
$db_config['default']['database'] = 'database';
Database name
$db_config['default']['user'] = 'user';
Database user
$db_config['default']['password'] = 'password';
Database password
$db_config['default']['options'] = array();
Driver specific options for the PDO object used by the ORM engine.
For more information read http://www.php.net/manual/es/pdo.setattribute.php
$db_config['default']['charset'] = 'UTF8';
Character encoding to use in the SET NAMES
query, you don't need to execute this query, QuarkPHP do it for you.
$routes = array();
Asociative array where the key is the regexp to match and the value is the the route to be used.
Example: "home/([0-9]+)" => 'home/entry/$1'
Any URL that match home/<number>
will be trated as home/entry/<number>